-
Notifications
You must be signed in to change notification settings - Fork 27
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 crashes in production mode #1045
Comments
Update: ignore this comment. This is a red herring caused by setting eager_load to true Here are some more clues: When running the debugger, I can see that So I tried editing the But then I got a series of similar errors for loading other files. I tried commenting out all these lines from
And this line from
And then the rails console still crashes, but it crashes with a different error. The new error is the exact error about trying to load a At this point, if I add this empty file to my workspace, the rails console will load without crashing: (Note that you don't actually have to define the MinterState class in the file; the file just has to exist) |
List of files that were already loaded at the time it tried to load Embargoable: |
Ok, ignore all those autoloading errors and just focus on the MinterState error message. Probably the class loading errors come from flipping the eager_load config without changing other configs to production mode. If I run:
Then I can see the minter state error message. |
I believe this is the parent bug: |
Addressed in #1061 (WIP). |
Fixed by #1061 |
Descriptive summary
We have an app that uses curation_concerns. It seems to be working fine in development mode, but when we deploy the app to production, both the rails server and the rails console crash.
I tried running production mode on my laptop, and it did cause the rails console to crash.
I was able to cause the error in development mode by settingconfig.eager_load = true
inconfig/environments/development.rb
.I was able to reproduce the error in my curation_concerns workspace using the rails app that's generated by engine_cart.
I first saw the problem in CC v1.6.1 (we are in the middle of upgrading from v1.0.0), but I also saw it on master (as of today, commit
fcaed70f
)Expected behavior
Rails console runs with no errors
Actual behavior
Rails console crashes
Steps to reproduce the behavior
Update: See comment below. Instead of toggling the eager_load in development mode, just run
rails c
in production mode instead.bundle exec rake engine_cart:generate
cd .internal_test_app
bin/rails c
Inconfig/environments/development.rb
setconfig.eager_load = true
RAILS_ENV=production bin/rails c
Notice the error
The text was updated successfully, but these errors were encountered: