From 8dca6586ded76d5950b4fccfb720e2861efede6d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 30 Nov 2006 21:45:31 +0000 Subject: Fixed that script/server running against Mongrel should tail the proper log regardless of the environment [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5652 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/commands/servers/mongrel.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'railties/lib/commands/servers/mongrel.rb') diff --git a/railties/lib/commands/servers/mongrel.rb b/railties/lib/commands/servers/mongrel.rb index e5bde9fe1b..63dd6bd71c 100644 --- a/railties/lib/commands/servers/mongrel.rb +++ b/railties/lib/commands/servers/mongrel.rb @@ -33,8 +33,11 @@ end puts "=> Rails application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}" if OPTIONS[:detach] - `mongrel_rails start -d -p #{OPTIONS[:port]} -a #{OPTIONS[:ip]} -e #{OPTIONS[:environment]}` + `mongrel_rails start -d -p #{OPTIONS[:port]} -a #{OPTIONS[:ip]} -e #{OPTIONS[:environment]} -P #{RAILS_ROOT}/tmp/pids/mongrel.pid` else + ENV["RAILS_ENV"] = OPTIONS[:environment] + RAILS_ENV.replace(OPTIONS[:environment]) if defined?(RAILS_ENV) + require 'initializer' Rails::Initializer.run(:initialize_logger) -- cgit v1.2.3