Rails - error in production mode
In config/environments/production.rb
temporally change
config.consider_all_requests_local = false
to
config.consider_all_requests_local = true
Look at the logs in log/production.log
. Usually this has to do with assets, maybe you need to put gem 'therubyracer'
into the Gemfile.
The error page is displayed by some entries in the rack middleware (i believe ActionDispatch::ShowExceptions
and ActionDispatch::DebugExceptions
). You could always add them to your application, but probably it's easier to check the logs. "Turning off" the page actually means adding stuff to display the exception page.
I always forget setting the environment variable for the SECRET_KEY_BASE
. Look at config/secrets.yml
.