aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2010-02-02 16:10:24 -0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2010-02-02 16:10:24 -0800
commit68ca336195522731b6a20e20b57808115c8318b4 (patch)
tree74f3425ae7f8fe251d20cfba82bf8560dfbbbd04 /railties
parent7840ea29b44c9dcdae72feddd1a5170bb22fb160 (diff)
downloadrails-68ca336195522731b6a20e20b57808115c8318b4.tar.gz
rails-68ca336195522731b6a20e20b57808115c8318b4.tar.bz2
rails-68ca336195522731b6a20e20b57808115c8318b4.zip
Fix rails server
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/generators/rails/app/templates/script/rails1
-rw-r--r--railties/lib/rails/commands/rails.rb2
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'