diff options
-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) |