diff options
Diffstat (limited to 'railties/lib/rails/commands.rb')
-rw-r--r-- | railties/lib/rails/commands.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index 991d2a0205..6972e25b29 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -33,10 +33,13 @@ when 'c', 'console' require APP_PATH Rails::Console.start(Rails::Application) when 's', 'server' - require APP_PATH require 'rails/commands/server' + # Initialize the server first, so environment options are set + server = Rails::Server.new + require APP_PATH + Dir.chdir(Rails::Application.root) - Rails::Server.start + server.start when 'db', 'dbconsole' require 'rails/commands/dbconsole' require APP_PATH |