views:

174

answers:

2

Hello,

I tried to run

ruby script/server RAILS_ENV=production

but somehow it always try to read "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

+4  A: 

script/server doesn't use RAILS_ENV.

Try ruby script/server -e production

vise
Thanks vise , you're right..my bad.
iwan
+2  A: 

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)

Michael F