diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-20 23:04:42 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-20 23:04:42 +0000 |
commit | ab3a813364c1c238728901849389bd2227ded8c2 (patch) | |
tree | 3f076c39c206afb7162511b41fdadf2bd0968108 | |
parent | 67a6668693811a2e6c709079346e26caf5be2a84 (diff) | |
download | rails-ab3a813364c1c238728901849389bd2227ded8c2.tar.gz rails-ab3a813364c1c238728901849389bd2227ded8c2.tar.bz2 rails-ab3a813364c1c238728901849389bd2227ded8c2.zip |
Fixed that script/server -d was broken so daemon mode couldn't be used #687 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@723 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/bin/server | 4 | ||||
-rw-r--r-- | railties/lib/webrick_server.rb | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index a0692fe12f..6b08682040 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed that script/server -d was broken so daemon mode couldn't be used #687 [Nicholas Seckar] + * Upgraded to breakpoint 92 which fixes: * overload IRB.parse_opts(), fixes #443 diff --git a/railties/bin/server b/railties/bin/server index c376620c89..2c0cfdfa8f 100644 --- a/railties/bin/server +++ b/railties/bin/server @@ -45,5 +45,7 @@ ENV["RAILS_ENV"] = OPTIONS[:environment] require File.dirname(__FILE__) + "/../config/environment" require 'webrick_server' +OPTIONS['working_directory'] = File.expand_path(RAILS_ROOT) + puts "=> Rails application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}" -DispatchServlet.dispatch(OPTIONS)
\ No newline at end of file +DispatchServlet.dispatch(OPTIONS) diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb index 22cdc9a845..9357c75e71 100644 --- a/railties/lib/webrick_server.rb +++ b/railties/lib/webrick_server.rb @@ -18,6 +18,7 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet trap("INT") { server.shutdown } server.start + Dir::chdir(OPTIONS['working_directory']) if OPTIONS['working_directory'] end def initialize(server, options) |