diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-09 08:40:06 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-09 08:40:21 -0800 |
commit | 39ebd6eb2b6c90756514798450eb15bdfec67be6 (patch) | |
tree | 2392dbfa7d40c671c89f1c17b5828d883f71840b | |
parent | 6f247347a11c7f59c510dd3ff8ee94628bc1df8b (diff) | |
download | rails-39ebd6eb2b6c90756514798450eb15bdfec67be6.tar.gz rails-39ebd6eb2b6c90756514798450eb15bdfec67be6.tar.bz2 rails-39ebd6eb2b6c90756514798450eb15bdfec67be6.zip |
rails runner loads environment after parsing command-line options
-rw-r--r-- | railties/lib/rails/commands.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/commands/runner.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index 5b73577e36..991d2a0205 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -58,8 +58,6 @@ when 'plugin' require 'rails/commands/plugin' when 'runner' require 'rails/commands/runner' - require ENV_PATH - when '--help', '-h' puts HELP_TEXT diff --git a/railties/lib/rails/commands/runner.rb b/railties/lib/rails/commands/runner.rb index 606e04483f..1570b9ab0d 100644 --- a/railties/lib/rails/commands/runner.rb +++ b/railties/lib/rails/commands/runner.rb @@ -35,6 +35,8 @@ ARGV.delete(code_or_file) ENV["RAILS_ENV"] = options[:environment] +require ENV_PATH + begin if code_or_file.nil? $stderr.puts "Run '#{$0} -h' for help." |