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
This commit is contained in:
Jamis Buck
2005-10-14 02:51:33 +00:00
parent cb24c0f141
commit 4b78e5bddb
3 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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",

View File

@@ -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