diff options
-rw-r--r-- | railties/lib/commands/runner.rb | 2 | ||||
-rw-r--r-- | railties/lib/commands/server.rb | 2 | ||||
-rw-r--r-- | railties/lib/initializer.rb | 2 |
3 files changed, 3 insertions, 3 deletions
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", diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index adcf5e274d..f6be1bb1ea 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -1,6 +1,6 @@ require 'logger' -RAILS_ENV = ENV['RAILS_ENV'] || 'development' unless defined?(RAILS_ENV) +RAILS_ENV = (ENV['RAILS_ENV'] || 'development').dup unless defined?(RAILS_ENV) module Rails # The Initializer is responsible for processing the Rails configuration, such as setting the $LOAD_PATH, requiring the |