How to Change Rails Env on Unicorn?

Posted June 25, 2015 3.4k views
Ruby on RailsNginxUbuntuPostgreSQLLinux Commands

Hello i’m new to ruby application deplloy, but when i using to learn.
but when i learn rails i used Webrick locally and i could setup and use many Envs, how i do that in unicorn? how can i have online application running in a version when i chage, upgrade and test my application without interfer in my running application?

PS: How i see the realtime log in unicorn, like the webrick when i run the “Rails s”?

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.

Submit an Answer
1 answer

I had the same problem and after lots of hunting found the file /etc/default/unicorn - edit this and change production to whatever environment you need under UNICORN_OPTS