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)
精彩评论