diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-07-14 16:13:51 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-07-14 16:13:51 +0000 |
commit | c05069479d33351b9db1a4b7393e71c608788d05 (patch) | |
tree | b8283e91b5d30a2f9ffcfab83ffd741d3c8620da /bin | |
parent | ab3c8082de82e6fc96838d444be06432620743ab (diff) | |
download | unicorn-c05069479d33351b9db1a4b7393e71c608788d05.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@293 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'bin')
-rw-r--r-- | bin/mongrel_rails | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/mongrel_rails b/bin/mongrel_rails index 8dd59e9..fa1fc36 100644 --- a/bin/mongrel_rails +++ b/bin/mongrel_rails @@ -33,7 +33,7 @@ class Start < GemPlugin::Plugin "/commands" ['-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], - ['', '--prefix PATH', "URL prefix for Rails app", :@prefix, '/'] + ['', '--prefix PATH', "URL prefix for Rails app", :@prefix, nil] ] end @@ -44,6 +44,7 @@ class Start < GemPlugin::Plugin "/commands" # change there to start, then we'll have to come back after daemonize Dir.chdir(@cwd) + valid? @prefix[-1].chr != "/", "Don't put / at the end of your prefix" if @prefix valid_dir? File.dirname(@log_file), "Path to log file not valid: #@log_file" valid_dir? File.dirname(@pid_file), "Path to pid file not valid: #@pid_file" valid_dir? @docroot, "Path to docroot not valid: #@docroot" @@ -106,8 +107,9 @@ class Start < GemPlugin::Plugin "/commands" debug "/" end - log "Starting Rails with #{defaults[:environment]} environment on #{defaults[:prefix]} ..." - uri defaults[:prefix], :handler => rails(:mime => mime, :prefix => @prefix) + log "Starting Rails with #{defaults[:environment]} environment..." + log "Mounting Rails at #{defaults[:prefix]}..." if defaults[:prefix] + uri defaults[:prefix] || "/", :handler => rails(:mime => mime, :prefix => defaults[:prefix]) log "Rails loaded." log "Loading any Rails specific GemPlugins" |