Unicorn does not work in production mode

I am running the nginx + unicorn + rails 3.2 stack

When i run

bundle exec unicorn_rails -c config/unicorn.rb -E development 

this is normal and the site is working well

when I try to run the unicorn site in production mode

 bundle exec unicorn_rails -c config/unicorn.rb -E production 

I have, "We're sorry, but something went wrong." Error:

enter image description here

+4
source share
3 answers

The problem was pre-compiling the script. It was resolved by adding the following line to "config / environment / production.rb":

 config.assets.compile = true 
+1
source

Have you migrated for production?

 rake db:migrate RAILS_ENV="production" 

The problem may not be a Unicorn.

+2
source

just add config.log_level = :debug to config / production.rb

you get an error log in the log /production.log insert the output of this log so that I can help you

also try rake assets:precompile

+2
source

All Articles