about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-07-13 22:34:59 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-07-13 22:34:59 +0000
commitab3c8082de82e6fc96838d444be06432620743ab (patch)
tree4b6324ed627ff4083a61f5c011500ee41893e238 /bin
parenta24136cd55995b748e3fed0db382f20cd49a315e (diff)
downloadunicorn-ab3c8082de82e6fc96838d444be06432620743ab.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@292 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'bin')
-rw-r--r--bin/mongrel_rails12
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/mongrel_rails b/bin/mongrel_rails
index f404044..8dd59e9 100644
--- a/bin/mongrel_rails
+++ b/bin/mongrel_rails
@@ -32,7 +32,8 @@ class Start < GemPlugin::Plugin "/commands"
       ['-S', '--script PATH', "Load the given file as an extra config script.", :@config_script, nil],
       ['-G', '--generate CONFIG', "Generate a config file for -C", :@generate, nil],
       ['', '--user USER', "User to run as", :@user, nil],
-      ['', '--group GROUP', "Group to run as", :@group, nil]
+      ['', '--group GROUP', "Group to run as", :@group, nil],
+      ['', '--prefix PATH', "URL prefix for Rails app", :@prefix, '/']
     ]
   end
 
@@ -64,7 +65,7 @@ class Start < GemPlugin::Plugin "/commands"
       :docroot => @docroot, :mime_map => @mime_map, :daemon => @daemon,
       :debug => @debug, :includes => ["mongrel"], :config_script => @config_script,
       :num_processors => @num_procs, :timeout => @timeout,
-      :user => @user, :group => @group
+      :user => @user, :group => @group, :prefix => @prefix
     }
 
     if @generate
@@ -103,13 +104,10 @@ class Start < GemPlugin::Plugin "/commands"
         if defaults[:debug]
           log "Installing debugging prefixed filters.  Look in log/mongrel_debug for the files."
           debug "/"
-        elsif not defaults[:daemon]
-          # they don't have debug on and aren't in daemon so at least log accesses
-          debug "/", what = [:files]
         end
 
-        log "Starting Rails with #{defaults[:environment]} environment ..."
-        uri "/", :handler => rails(:mime => mime)
+        log "Starting Rails with #{defaults[:environment]} environment on #{defaults[:prefix]} ..."
+        uri defaults[:prefix], :handler => rails(:mime => mime, :prefix => @prefix)
         log "Rails loaded."
 
         log "Loading any Rails specific GemPlugins"