Kevin Clark
2006-Jul-30 00:37 UTC
script/server and mongrel command line options are not happy
I just tried to file a ticket for these but trac is giving me errors
in the sql. Awesome.
Anyway, -d is broken for myself and a few others I''ve talked to. The
server starts but only reports 500 errors. This only occurs through
script/server and not through mongrel_rails -d.
Additionally script/server with -e doesn''t work properly with mongrel.
It reports it is loading the correct environment but loads the wrong
database. The issue is that RAILS_ENV is already defined so it goes
with that instead of ENV["RAILS_ENV"] which I assume is set by mongrel
when it loads.
Here''s my fix on railties/lib/commands/servers/mongrel.rb:
27,32d26
< opt.on("-e", "--environment=name", String,
< "Specifies the environment to run this server under
(test/development/production).",
< "Default: development") { |v|
< ENV["RAILS_ENV"] = v
< RAILS_ENV.replace(v) if defined?(RAILS_ENV)
< }
I hate trac so much.
--
Kevin Clark
http://glu.ttono.us
Kevin Clark
2006-Aug-09 20:29 UTC
Re: script/server and mongrel command line options are not happy
I''m bumping this since I haven''t seen teh fix go in. On 7/29/06, Kevin Clark <kevin.clark@gmail.com> wrote:> I just tried to file a ticket for these but trac is giving me errors > in the sql. Awesome. > > Anyway, -d is broken for myself and a few others I''ve talked to. The > server starts but only reports 500 errors. This only occurs through > script/server and not through mongrel_rails -d. > > Additionally script/server with -e doesn''t work properly with mongrel. > It reports it is loading the correct environment but loads the wrong > database. The issue is that RAILS_ENV is already defined so it goes > with that instead of ENV["RAILS_ENV"] which I assume is set by mongrel > when it loads. > > Here''s my fix on railties/lib/commands/servers/mongrel.rb: > > > 27,32d26 > < opt.on("-e", "--environment=name", String, > < "Specifies the environment to run this server under > (test/development/production).", > < "Default: development") { |v| > < ENV["RAILS_ENV"] = v > < RAILS_ENV.replace(v) if defined?(RAILS_ENV) > < } > > > I hate trac so much. > > -- > Kevin Clark > http://glu.ttono.us >-- Kevin Clark http://glu.ttono.us