1
votes

I'm deploying a rails app into production.

I'm struggling to find a explanation on where one sets the rails_env to production. Is it done in Unicorn or Nginx.

The app currently thinks that it is in development I've tried to boot unicorn using sudo service unicorn start -E production

1
set all required variables to export. then just either set up the sudo to keep user variables, or run the service out of sudo (for example just of root/webserver)Малъ Скрылевъ

1 Answers

0
votes

Start your Nginx daemon (it depends on your OS). And than unicorn like this:

$ unicorn_rails -E production -c /var/www/unicorn/config/unicorn.rb -D