Skip to content

Commit

Permalink
Fix problem with RAILS_ENV being frozen when set from environment var…
Browse files Browse the repository at this point in the history
…iable

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jamis committed Oct 14, 2005
1 parent cb24c0f commit 4b78e5b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 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)
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/commands/server.rb
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down

0 comments on commit 4b78e5b

Please sign in to comment.