aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorYehuda Katz <wycats@Yehuda-Katz.local>2009-11-16 13:58:08 -0800
committerYehuda Katz <wycats@Yehuda-Katz.local>2009-11-16 13:58:08 -0800
commitc2997017f79321a8d90af84b1de35f87e3dd2445 (patch)
tree748a22a5567419ef4c88d093136a351fbdb4e0ea /railties
parent2675ba9ef4ae1839f721aff77c255ee1cb8ac7ac (diff)
downloadrails-c2997017f79321a8d90af84b1de35f87e3dd2445.tar.gz
rails-c2997017f79321a8d90af84b1de35f87e3dd2445.tar.bz2
rails-c2997017f79321a8d90af84b1de35f87e3dd2445.zip
Make script/server work with correct application.rb
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/application.rb5
-rw-r--r--railties/lib/rails/commands/server.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index 10cba8ab6c..7c2d8eab67 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -3,6 +3,11 @@ module Rails
include Initializable
class << self
+ def inherited(klass)
+ Rails.application ||= klass unless klass.name =~ /Rails/
+ super
+ end
+
# Stub out App initialize
def initialize!
new
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb
index 37dfa3b9bb..2c90851fb2 100644
--- a/railties/lib/rails/commands/server.rb
+++ b/railties/lib/rails/commands/server.rb
@@ -42,7 +42,7 @@ unless server
end
puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}"
-puts "=> Rails #{Rails.version} application starting on http://#{options[:Host]}:#{options[:Port]}}"
+puts "=> Rails #{Rails.version} application starting on http://#{options[:Host]}:#{options[:Port]}"
if options[:detach]
Process.daemon