From 4b78e5bddbf75a803452fd69f077b6c1ef1c267d Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Fri, 14 Oct 2005 02:51:33 +0000 Subject: Fix problem with RAILS_ENV being frozen when set from environment variable git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/commands/runner.rb | 2 +- railties/lib/commands/server.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/lib/commands') diff --git a/railties/lib/commands/runner.rb b/railties/lib/commands/runner.rb index 49827c3812..27a2cf33d6 100644 --- a/railties/lib/commands/runner.rb +++ b/railties/lib/commands/runner.rb @@ -1,6 +1,6 @@ require 'optparse' -options = { :environment => "development" } +options = { :environment => (ENV['RAILS_ENV'] || "development").dup } ARGV.options do |opts| script_name = File.basename($0) diff --git a/railties/lib/commands/server.rb b/railties/lib/commands/server.rb index 375fb4df07..db8e8b3d93 100644 --- a/railties/lib/commands/server.rb +++ b/railties/lib/commands/server.rb @@ -4,7 +4,7 @@ require 'optparse' OPTIONS = { :port => 3000, :ip => "0.0.0.0", - :environment => "development", + :environment => (ENV['RAILS_ENV'] || "development").dup, :server_root => File.expand_path(RAILS_ROOT + "/public/"), :server_type => WEBrick::SimpleServer, :charset => "UTF-8", -- cgit v1.2.3