How to Change Rails Env on Unicorn?

June 25, 2015 2.7k views
Nginx Ruby on Rails Linux Commands PostgreSQL

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”?

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

Have another answer? Share your knowledge.