From bbe9ee13e1828daf6c2c548d14dd93e2b75497b8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 7 Nov 2005 13:31:19 +0000 Subject: 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 --- railties/lib/commands/server.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'railties/lib/commands/server.rb') diff --git a/railties/lib/commands/server.rb b/railties/lib/commands/server.rb index 64e5b1fa7a..ab22f2c565 100644 --- a/railties/lib/commands/server.rb +++ b/railties/lib/commands/server.rb @@ -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" -- cgit v1.2.3