Hi all, I''m attempting to get running with Selenium, and to do so you have to start script/server -e test. However, I''ve noticed that when I start mongrel that way RAILS_ENV is still set to "development", even though the mongrel startup messages in the console say that it''s starting rails with test. However, if I start mongrel with mongrel_rails -e test, RAILS_ENV gets correctly set to test. Can anyone else verify that this is going on? I''ve been through the script/server code and subsequent mongrel startup scripts and I haven''t managed to find where it''s gone wrong yet... Thanks, Matt -- Thermal Creative http://blog.thermalcreative.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Weird, but RAILS_ENV="test" script/server ? On 11/15/06, Matt White <stockliasteroid-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > I''m attempting to get running with Selenium, and to do so you have to start > script/server -e test. However, I''ve noticed that when I start mongrel that > way RAILS_ENV is still set to "development", even though the mongrel startup > messages in the console say that it''s starting rails with test. > > However, if I start mongrel with mongrel_rails -e test, RAILS_ENV gets > correctly set to test. > > Can anyone else verify that this is going on? I''ve been through the > script/server code and subsequent mongrel startup scripts and I haven''t > managed to find where it''s gone wrong yet... > > Thanks, > > Matt > > -- > Thermal Creative > http://blog.thermalcreative.com > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
script/server with defaults yields RAILS_ENV="development" script/server -e production yields RAILS_ENV="development" script/server -e test yields RAILS_ENV="development" mongrel_rails start yields RAILS_ENV="development" mongrel_rails start -e production yields RAILS_ENV="production" mongrel_rails start -e test yields RAILS_ENV="test" So, it appears that RAILS_ENV is not getting set properly when Mongrel is started via script/server -e environment. The same commands run with script/server webrick -e test yields RAILS_ENV test, etc. Perhaps this is behavior by design, but the Mongrel startup would lead me to believe that it''s a bug, since Mongrel appears to start up in test but the RAILS_ENV is still hardwired to development regardless of the specified environment. Matt On 11/15/06, Vishnu Gopal <g.vishnu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Weird, but RAILS_ENV="test" script/server ? > > On 11/15/06, Matt White <stockliasteroid-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi all, > > > > I''m attempting to get running with Selenium, and to do so you have to > start > > script/server -e test. However, I''ve noticed that when I start mongrel > that > > way RAILS_ENV is still set to "development", even though the mongrel > startup > > messages in the console say that it''s starting rails with test. > > > > However, if I start mongrel with mongrel_rails -e test, RAILS_ENV gets > > correctly set to test. > > > > Can anyone else verify that this is going on? I''ve been through the > > script/server code and subsequent mongrel startup scripts and I haven''t > > managed to find where it''s gone wrong yet... > > > > Thanks, > > > > Matt > > > > -- > > Thermal Creative > > http://blog.thermalcreative.com > > > > > > > > >-- Thermal Creative http://blog.thermalcreative.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
priit.tamboom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Nov-15 14:07 UTC
Re: script/server set environment
Yep, I have got the same problem and it seems just a little bug. I was using ''script/server -e production'' but mongrel was still in development env. Using mongrel directly everything was ok. Priit Matt White wrote:> script/server with defaults yields RAILS_ENV="development" > script/server -e production yields RAILS_ENV="development" > script/server -e test yields RAILS_ENV="development" > > mongrel_rails start yields RAILS_ENV="development" > mongrel_rails start -e production yields RAILS_ENV="production" > mongrel_rails start -e test yields RAILS_ENV="test" >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---