diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/generators/rails/app/templates/script/rails | 1 | ||||
-rw-r--r-- | railties/lib/rails/commands/rails.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/generators/rails/app/templates/script/rails b/railties/lib/generators/rails/app/templates/script/rails index 1886efc05d..c23d24b30b 100644 --- a/railties/lib/generators/rails/app/templates/script/rails +++ b/railties/lib/generators/rails/app/templates/script/rails @@ -3,6 +3,7 @@ ENV_PATH = File.expand_path('../../config/environment', __FILE__) BOOT_PATH = File.expand_path('../../config/boot', __FILE__) APP_PATH = File.expand_path('../../config/application', __FILE__) +ROOT_PATH = File.expand_path('../..', __FILE__) require BOOT_PATH require 'rails/commands/rails' diff --git a/railties/lib/rails/commands/rails.rb b/railties/lib/rails/commands/rails.rb index 2e7c6931dd..a422d33e67 100644 --- a/railties/lib/rails/commands/rails.rb +++ b/railties/lib/rails/commands/rails.rb @@ -33,7 +33,7 @@ when 'c', 'console' Rails::Console.start(Rails::Application) when 's', 'server' require 'rails/commands/server' - Dir.chdir(File.expand_path('../..', __FILE__)) + Dir.chdir(ROOT_PATH) Rails::Server.start when 'dbconsole' |