mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
aec5273f41
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2920 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
28 lines
No EOL
537 B
Ruby
28 lines
No EOL
537 B
Ruby
require 'active_support'
|
|
|
|
begin
|
|
require_library_or_gem 'fcgi'
|
|
rescue Exception
|
|
# FCGI not available
|
|
end
|
|
|
|
server = case ARGV.first
|
|
when "lighttpd"
|
|
ARGV.shift
|
|
when "webrick"
|
|
ARGV.shift
|
|
else
|
|
if RUBY_PLATFORM !~ /mswin/ && !silence_stderr { `lighttpd -version` }.blank? && defined?(FCGI)
|
|
"lighttpd"
|
|
else
|
|
"webrick"
|
|
end
|
|
end
|
|
|
|
if server == "webrick"
|
|
puts "=> Booting WEBrick..."
|
|
else
|
|
puts "=> Booting lighttpd (use 'script/server webrick' to force WEBrick)"
|
|
end
|
|
|
|
require "commands/servers/#{server}" |