aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
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