1 require 'active_support'
5 require_library_or_gem
'fcgi'
11 require_library_or_gem
'mongrel'
13 # Mongrel not available
17 require_library_or_gem
'thin'
22 server
= case ARGV.first
23 when "lighttpd", "mongrel", "new_mongrel", "webrick", "thin"
30 elsif RUBY_PLATFORM !~
/(:?mswin|mingw)/ && !silence_stderr
{ `lighttpd -version` }.blank
? && defined?(FCGI
)
39 puts
"=> Booting WEBrick..."
41 puts
"=> Booting lighttpd (use 'script/server webrick' to force WEBrick)"
42 when "mongrel", "new_mongrel"
43 puts
"=> Booting Mongrel (use 'script/server webrick' to force WEBrick)"
45 puts
"=> Booting Thin (use 'script/server webrick' to force WEBrick)"
48 %w(cache pids sessions sockets
).each
{ |dir_to_make
| FileUtils
.mkdir_p(File
.join(RAILS_ROOT
, 'tmp', dir_to_make
)) }
49 require "commands/servers/#{server}"