Checkout of Instiki Trunk 1/21/2007.
This commit is contained in:
commit
69b62b6f33
1138 changed files with 139586 additions and 0 deletions
30
vendor/rails/railties/lib/commands/server.rb
vendored
Normal file
30
vendor/rails/railties/lib/commands/server.rb
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
require 'active_support'
|
||||
require 'fileutils'
|
||||
|
||||
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
|
||||
|
||||
FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets ))
|
||||
require "commands/servers/#{server}"
|
Loading…
Add table
Add a link
Reference in a new issue