mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
Make sure to check for FCGI as well as lighttpd
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2917 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
require 'active_support'
|
||||
|
||||
begin
|
||||
require '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?
|
||||
if RUBY_PLATFORM !~ /mswin/ && !silence_stderr { `lighttpd -version` }.blank? && defined?(FCGI)
|
||||
"lighttpd"
|
||||
else
|
||||
"webrick"
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
require 'active_support'
|
||||
|
||||
unless RUBY_PLATFORM !~ /mswin/ && !silence_stderr { `lighttpd -version` }.blank?
|
||||
puts "lighttpd is not available on your system (or not in your path)"
|
||||
puts "PROBLEM: Lighttpd is not available on your system (or not in your path)"
|
||||
exit 1
|
||||
end
|
||||
|
||||
unless defined?(FCGI)
|
||||
puts "PROBLEM: Lighttpd requires that the FCGI Ruby bindings are installed on the system"
|
||||
exit 1
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user