Permalink
Browse files

Fix problem with RAILS_ENV being frozen when set from environment var…

…iable

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent cb24c0f commit 4b78e5bddbf75a803452fd69f077b6c1ef1c267d @jamis jamis committed Oct 14, 2005
Showing with 3 additions and 3 deletions.
  1. +1 −1 railties/lib/commands/runner.rb
  2. +1 −1 railties/lib/commands/server.rb
  3. +1 −1 railties/lib/initializer.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)
@@ -4,7 +4,7 @@
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",
@@ -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

0 comments on commit 4b78e5b

Please sign in to comment.