Permalink
Browse files

Make script/server work with correct application.rb

  • Loading branch information...
Yehuda Katz Yehuda Katz
Yehuda Katz authored and Yehuda Katz committed Nov 16, 2009
1 parent 2675ba9 commit c2997017f79321a8d90af84b1de35f87e3dd2445
Showing with 6 additions and 1 deletion.
  1. +5 −0 railties/lib/rails/application.rb
  2. +1 −1 railties/lib/rails/commands/server.rb
@@ -3,6 +3,11 @@ class Application
include Initializable
class << self
+ def inherited(klass)
+ Rails.application ||= klass unless klass.name =~ /Rails/
+ super
+ end
+
# Stub out App initialize
def initialize!
new
@@ -42,7 +42,7 @@
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

0 comments on commit c299701

Please sign in to comment.