aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/server.rb
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/commands/server.rb
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/commands/server.rb')
-rw-r--r--railties/lib/rails/commands/server.rb20
1 files changed, 4 insertions, 16 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb
index 57b7c6a49c..09d7207d51 100644
--- a/railties/lib/rails/commands/server.rb
+++ b/railties/lib/rails/commands/server.rb
@@ -37,15 +37,6 @@ module Rails
Options.new
end
- def self.start(app)
- new(app).start
- end
-
- def initialize(app)
- super() # Call Rack::Server#initialize without passing any options to use.
- @app = app
- end
-
def start
puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}"
puts "=> Rails #{Rails.version} application starting on http://#{options[:Host]}:#{options[:Port]}"
@@ -69,20 +60,17 @@ module Rails
end
def log_path
- "#{File.expand_path(@app.root)}/log/#{options[:environment]}.log"
+ "log/#{options[:environment]}.log"
end
def default_options
- {
+ super.merge({
:Port => 3000,
- :Host => "0.0.0.0",
:environment => (ENV['RAILS_ENV'] || "development").dup,
- :rack_file => "#{@app.root}/config.ru",
:daemonize => false,
:debugger => false,
- :pid => "#{@app.root}/tmp/pids/server.pid",
- :AccessLog => []
- }
+ :pid => "tmp/pids/server.pid"
+ })
end
end
end