diff --git a/railties/lib/commands/runner.rb b/railties/lib/commands/runner.rb index c7a70a1b0baa6d957418ee99279eda33728f062f..49827c3812c9896ac4956013d79f7bb7ffbec5e6 100644 --- a/railties/lib/commands/runner.rb +++ b/railties/lib/commands/runner.rb @@ -20,11 +20,8 @@ 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)