mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
5ca8b5fca4
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
22 lines
No EOL
436 B
Ruby
22 lines
No EOL
436 B
Ruby
require 'active_support'
|
|
|
|
server = case ARGV.first
|
|
when "lighttpd"
|
|
ARGV.shift
|
|
when "webrick"
|
|
ARGV.shift
|
|
else
|
|
if RUBY_PLATFORM !~ /mswin/ && !silence_stderr { `lighttpd -version` }.blank?
|
|
"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}" |