diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-12 20:40:34 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-12 20:40:34 +0100 |
commit | 2b0611b9bb3259859b4776e672e5ef93a8b08620 (patch) | |
tree | b9f8bf73f6bffa0246ed32346576c4b76563cc21 /railties/lib/rails/commands.rb | |
parent | f2c0a353aef41a6df2de8e1fe3eaa3d8bbd8a6dd (diff) | |
download | rails-2b0611b9bb3259859b4776e672e5ef93a8b08620.tar.gz rails-2b0611b9bb3259859b4776e672e5ef93a8b08620.tar.bz2 rails-2b0611b9bb3259859b4776e672e5ef93a8b08620.zip |
Revert "Always load the environment before executing any command. [#3905 status:resolved]"
This reverts commit 16846553b8866eab2aa3b128a2a23a221a25f7e3.
Diffstat (limited to 'railties/lib/rails/commands.rb')
-rw-r--r-- | railties/lib/rails/commands.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index d4558be00f..6972e25b29 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -30,17 +30,19 @@ when 'g', 'generate' require 'rails/commands/generate' when 'c', 'console' require 'rails/commands/console' - require ENV_PATH + require APP_PATH Rails::Console.start(Rails::Application) when 's', 'server' require 'rails/commands/server' + # Initialize the server first, so environment options are set server = Rails::Server.new - require ENV_PATH + require APP_PATH + Dir.chdir(Rails::Application.root) server.start when 'db', 'dbconsole' require 'rails/commands/dbconsole' - require ENV_PATH + require APP_PATH Rails::DBConsole.start(Rails::Application) when 'application' @@ -55,7 +57,7 @@ when 'profiler' require ENV_PATH require 'rails/commands/performance/profiler' when 'plugin' - require ENV_PATH + require APP_PATH require 'rails/commands/plugin' when 'runner' require 'rails/commands/runner' |