diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-29 08:39:44 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-29 08:39:52 +0200 |
commit | 1b816d502444ce2b3153d8c689d0057f1c257eee (patch) | |
tree | 4fb975de78c82295568b64bde76132084c8089ac /railties/lib/rails/commands | |
parent | e33d304975f5b20b0ba819ab644a2a8f80ff3743 (diff) | |
download | rails-1b816d502444ce2b3153d8c689d0057f1c257eee.tar.gz rails-1b816d502444ce2b3153d8c689d0057f1c257eee.tar.bz2 rails-1b816d502444ce2b3153d8c689d0057f1c257eee.zip |
The rake task :environment now loads config/environment.rb instead of initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks.
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r-- | railties/lib/rails/commands/benchmarker.rb (renamed from railties/lib/rails/commands/performance/benchmarker.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/commands/profiler.rb (renamed from railties/lib/rails/commands/performance/profiler.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/commands/runner.rb | 3 |
3 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/performance/benchmarker.rb b/railties/lib/rails/commands/benchmarker.rb index 0432261802..0432261802 100644 --- a/railties/lib/rails/commands/performance/benchmarker.rb +++ b/railties/lib/rails/commands/benchmarker.rb diff --git a/railties/lib/rails/commands/performance/profiler.rb b/railties/lib/rails/commands/profiler.rb index 6d9717b5cd..6d9717b5cd 100644 --- a/railties/lib/rails/commands/performance/profiler.rb +++ b/railties/lib/rails/commands/profiler.rb diff --git a/railties/lib/rails/commands/runner.rb b/railties/lib/rails/commands/runner.rb index 1dd11e1241..278548558e 100644 --- a/railties/lib/rails/commands/runner.rb +++ b/railties/lib/rails/commands/runner.rb @@ -36,7 +36,8 @@ ARGV.delete(code_or_file) ENV["RAILS_ENV"] = options[:environment] -require ENV_PATH +require APP_PATH +Rails::Application.require_environment! begin if code_or_file.nil? |