I have Ruby on Rails 5, NginX, and Ubuntu 16.04. running on my droplet. The app has been running for a number of years, however, for some reason it keeps reverting back to development mode.
Every time I run
rake about it tells me that Rails is in development mode.
This is strange because I am telling Rails very clearly that I want it to run in production mode, for example in my unicorn configuration file:
Whenever I do something on the server, for example, run a migration I tell Rails that it should be done in a production context:
rake db:migrate RAILS_ENV=production
But still Rails seems to be running in development mode all the time.
This command doesn’t help either:
RAILS_ENV=production rake about
How can I set my Rails app to production mode permanently?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!