Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change environment when using Pow server in Rails app

I'm currently using Pow as a server in my Rails app, and need to change environments from development to production. I've added RAILS_ENV = 'production' to my config/environment file and restarted the server; however, logs are still being generated in log/development

like image 335
Anconia Avatar asked Mar 21 '23 07:03

Anconia


1 Answers

Yyou can find the answer from Pow's FAQ:

Can I run my app in different rails environments through Pow?

Pow is intended for development use only, but if you just want to test how your app behaves with the settings for your different environments (e.g. production), you can run the following from your app directory.

echo export RAILS_ENV=production > .powenv && touch tmp/restart.txt

You can get more info about .powenv from Pow's user manual.

like image 181
nickcen Avatar answered Mar 31 '23 20:03

nickcen