From bce8665853fd1ef66771e462247c9712cf18f0b1 Mon Sep 17 00:00:00 2001 From: zedshaw Date: Fri, 10 Feb 2006 02:38:18 +0000 Subject: Fixed the URIClassifier to solve a problem with 1 character lookups. Completed more work on Rails runner. Add index.html default lookup for DirHandler. Added some new tests for URIClassifier. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@24 19e92222-5c0b-0410-8929-a290d50e31e9 --- bin/mongrel_rails | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'bin') diff --git a/bin/mongrel_rails b/bin/mongrel_rails index 3f7b124..0392949 100644 --- a/bin/mongrel_rails +++ b/bin/mongrel_rails @@ -1,4 +1,4 @@ -require 'config/environment' +require 'rubygems' require 'mongrel' require 'cgi' begin @@ -78,12 +78,13 @@ end cwd = Dir.pwd -#Daemonize.daemonize(log_file=File.join(cwd,"log","mongrel.log")) -#Dir.chdir(cwd) - -open(File.join(cwd,"log/mongrel-#{ARGV[1]}.pid"),"w") {|f| f.write(Process.pid) } -h = Mongrel::HttpServer.new(ARGV[0], ARGV[1]) -h.register("/", RailsHandler.new(File.join(cwd,"public"))) -h.run - -h.acceptor.join +Daemonize.daemonize(log_file=File.join(cwd,"log","mongrel.log")) +Dir.chdir(cwd) do + require 'config/environment' + open(File.join(cwd,"log/mongrel-#{ARGV[1]}.pid"),"w") {|f| f.write(Process.pid) } + h = Mongrel::HttpServer.new(ARGV[0], ARGV[1]) + h.register("/", RailsHandler.new(File.join(cwd,"public"))) + h.run + + h.acceptor.join +end -- cgit v1.2.3-24-ge0c7