aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/commands/servers/new_mongrel.rb
blob: 174dbf8a378761626c4fbe573b018f25d8f1b730 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                                                      
unless defined?(Mongrel)
  abort "PROBLEM: Mongrel is not available on your system (or not in your path)"
end

require 'rails/mongrel_server/commands'

GemPlugin::Manager.instance.load "rails::mongrel" => GemPlugin::INCLUDE, "rails" => GemPlugin::EXCLUDE

case ARGV[0] ||= 'start'
when 'start', 'stop', 'restart'
  ARGV[0] = "rails::mongrelserver::#{ARGV[0]}"
end

if not Mongrel::Command::Registry.instance.run ARGV
  exit 1
end