开发者

ruby script/server not reading RAILS_ENV option

开发者 https://www.devze.com 2022-12-29 13:25 出处:网络
I tried to run ruby script/server RAILS_ENV=production but somehow it always try to read 开发者_如何学Python\"development\" config.. nothings wrong with RAKE XXX RAILS_ENV=production (trying to re

I tried to run

ruby script/server RAILS_ENV=production

but somehow it always try to read 开发者_如何学Python"development" config.. nothings wrong with RAKE XXX RAILS_ENV=production (trying to read production config).

Any idea how to troubleshoot?

I have my other rails app in the same machine and it works fine. The problem above only happen for redmine rails.

Thanks in advance. -iwan


script/server doesn't use RAILS_ENV.

Try ruby script/server -e production


The problem with the first command was that the environment needs to be set prior to invoking the server, so: RAILS_ENV="production" script/server

(although, as noted, appending "-e production" afterwards does the same thing)

0

精彩评论

暂无评论...
验证码 换一张
取 消