diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-02-14 19:28:05 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-02-14 19:28:05 +0000 |
commit | 6f3c5f67870a625b8be4de6e34e8d0d2f5d2b5e3 (patch) | |
tree | 3da8d75101aabe3c1d90d0582505ec1480c9d885 /railties/lib/rails/commands.rb | |
parent | 77bf78b3b78a41d4f2f6e733f5c9c00608c0adba (diff) | |
parent | a1b60696e2b13cbe94d748444cc0da37b190fbb8 (diff) | |
download | rails-6f3c5f67870a625b8be4de6e34e8d0d2f5d2b5e3.tar.gz rails-6f3c5f67870a625b8be4de6e34e8d0d2f5d2b5e3.tar.bz2 rails-6f3c5f67870a625b8be4de6e34e8d0d2f5d2b5e3.zip |
Merge remote branch 'mainstream/master'
Conflicts:
railties/README
railties/guides/source/active_support_core_extensions.textile
railties/guides/source/getting_started.textile
railties/lib/generators/rails/app/templates/README
Diffstat (limited to 'railties/lib/rails/commands.rb')
-rw-r--r-- | railties/lib/rails/commands.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index 4240038673..6972e25b29 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -34,8 +34,12 @@ when 'c', 'console' Rails::Console.start(Rails::Application) when 's', 'server' require 'rails/commands/server' - Dir.chdir(ROOT_PATH) - Rails::Server.start + # Initialize the server first, so environment options are set + server = Rails::Server.new + require APP_PATH + + Dir.chdir(Rails::Application.root) + server.start when 'db', 'dbconsole' require 'rails/commands/dbconsole' require APP_PATH @@ -57,11 +61,7 @@ when 'plugin' require 'rails/commands/plugin' when 'runner' require 'rails/commands/runner' - require ENV_PATH - -when '--version', '-v' - puts "Rails #{Rails::VERSION::STRING}" when '--help', '-h' puts HELP_TEXT when '--version', '-v' @@ -70,4 +70,4 @@ when '--version', '-v' else puts "Error: Command not recognized" puts HELP_TEXT -end
\ No newline at end of file +end |