Make script/server work with correct application.rb

This commit is contained in:
Yehuda Katz
2009-11-16 13:58:08 -08:00
parent 2675ba9ef4
commit c2997017f7
2 changed files with 6 additions and 1 deletions

View File

@@ -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

View File

@@ -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