开发者

ruby script/server not reading RAILS_ENV option

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜