Skip to content

Commit

Permalink
Fixed that script/server -d was broken so daemon mode couldn't be used
Browse files Browse the repository at this point in the history
…rails#687 [Nicholas Seckar]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@723 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Feb 20, 2005
1 parent 67a6668 commit ab3a813
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions railties/CHANGELOG
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion railties/bin/server
Original file line number Diff line number Diff line change
Expand Up @@ -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)
DispatchServlet.dispatch(OPTIONS)
1 change: 1 addition & 0 deletions railties/lib/webrick_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def self.dispatch(options = {})

trap("INT") { server.shutdown }
server.start
Dir::chdir(OPTIONS['working_directory']) if OPTIONS['working_directory']
end

def initialize(server, options)
Expand Down

0 comments on commit ab3a813

Please sign in to comment.