-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails 5 app can't boot if webpack-dev-server config is present #1847
Comments
Also relevant: If I try to do a My webpacker.yml file is pretty straightforward:
The following was in
|
@ntaylor89 Any chance both are related? #1700 |
I don't think it is. Eager load is set to false in development. We did have the rails_admin gem installed, but I removed it prior to the rails 5 upgrade. |
It's definitely the same error, but the steps to fix didn't work for me. |
Might be another gem? thoughtbot/factory_bot_rails#247 same issue filed here: rails/rails#33745 Are you using spring? |
@ntaylor89 What happens if you run |
I did upgrade from |
We're not using spring, either 😞 |
Ahh right, this is annoying (sorry) I guess the best way would be to keep disabling gems and see which one fixes it. I guess a good starting point would be to disable anything that's not Rails and inserts a middleware. Are you using devise? I see warden middleware. I know you might have done this already, just suggesting :) |
Actually, devise is maybe the one gem I haven't disabled that inserts middleware. Good catch. I was going off of obvious names in the middleware, and since those register as Thanks. I'll give throwing out devise a shot and get back to you. Past that, based on what's in my middleware, I might be running out of gems to disable. |
Think I got it. We have a rails engine included in our app as a gem, which I was able to isolate the problem to. And I fixed it by doing the the same thing Change this
To this
We can close this. Thanks. |
Can this issue be closed ? |
I'm currently working upgrading a Rails app to Rails 5.
The webpacker gem is already installed, and at version 3.5.5.
Binstubs have been regenerated and configs have been updated.
Current ruby version is 2.3.7
All the yarn packages succesfully install.
No matter what version of Rails 5 I upgrade to, running any rails command like
rails s
orrails db:migrate
gives me the following error:Which I can get around if I set the development config of
webpacker.yml
to nil, which causes webpacker to not insert the middleware (making the dev server not work).Past issues have pointed to other gems, I've seen previous issues point to rails-admin. So I removed rails admin completely. Same.
The middleware is frozen by the time the webpacker-dev-server gem tries to insert itself.
I've done some
binding.pry
in theinsert
method of the middleware stack to see what's being inserted and when. the only middleware that currently seems to be inserted in a way that would trigger that method areActiveRecord::Migration::CheckPending
and the CacheStrategy middleware.At this point I've removed everything I thought could be a culprit. Here's a current list of middleware at the time the dev-server attempts to insert itself
Any ideas? I'm at a loss at this point.
The text was updated successfully, but these errors were encountered: