diff options
author | Jamis Buck <jamis@37signals.com> | 2005-10-12 12:44:03 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-10-12 12:44:03 +0000 |
commit | de42f26df787af135baef65f59aa145873714aa5 (patch) | |
tree | 0700b99861080e50e7693bf5707e14665ba4460d /railties | |
parent | 42bcbcb043cd6404fd75e71c1cd5a8c2abe23bc1 (diff) | |
download | rails-de42f26df787af135baef65f59aa145873714aa5.tar.gz rails-de42f26df787af135baef65f59aa145873714aa5.tar.bz2 rails-de42f26df787af135baef65f59aa145873714aa5.zip |
Make sure ENV['RAILS_ENV'] and RAILS_ENV are kept in sync
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/commands/runner.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/railties/lib/commands/runner.rb b/railties/lib/commands/runner.rb index c7a70a1b0b..49827c3812 100644 --- a/railties/lib/commands/runner.rb +++ b/railties/lib/commands/runner.rb @@ -20,11 +20,8 @@ ARGV.options do |opts| opts.parse! end -if defined?(RAILS_ENV) - RAILS_ENV.replace(options[:environment]) -else - ENV["RAILS_ENV"] = options[:environment] -end +ENV["RAILS_ENV"] = options[:environment] +RAILS_ENV.replace(options[:environment]) if defined?(RAILS_ENV) require RAILS_ROOT + '/config/environment' eval(ARGV.first) |