aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-12-26 18:21:36 -0600
committerJoshua Peek <josh@joshpeek.com>2009-12-26 18:23:48 -0600
commitbdf8ee44c54dec181827c02c2b74ea329bdab931 (patch)
treebdaebd713fb770b1e500f5c8c3478bc28638bf4a /railties/lib/rails/generators
parentf6f416c58e805604390314e2e8e5ecf6a0a78b4f (diff)
downloadrails-bdf8ee44c54dec181827c02c2b74ea329bdab931.tar.gz
rails-bdf8ee44c54dec181827c02c2b74ea329bdab931.tar.bz2
rails-bdf8ee44c54dec181827c02c2b74ea329bdab931.zip
script/server should init Rails by loading config.ru
Fixes "Rails 3.0 doesn't fucking work"
Diffstat (limited to 'railties/lib/rails/generators')
-rwxr-xr-xrailties/lib/rails/generators/rails/app/templates/script/server.tt6
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/script/server.tt b/railties/lib/rails/generators/rails/app/templates/script/server.tt
index 380dc42cb5..4fd0cc7832 100755
--- a/railties/lib/rails/generators/rails/app/templates/script/server.tt
+++ b/railties/lib/rails/generators/rails/app/templates/script/server.tt
@@ -1,3 +1,5 @@
-require File.expand_path('../../config/application', __FILE__)
+require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands/server'
-Rails::Server.start(<%= app_const %>.instance)
+
+Dir.chdir(File.expand_path('../..', __FILE__))
+Rails::Server.start