diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-11-07 13:31:19 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-11-07 13:31:19 +0000 |
commit | bbe9ee13e1828daf6c2c548d14dd93e2b75497b8 (patch) | |
tree | a9c744fb95545cd71543b96cf20d57a5322aeb00 /railties | |
parent | ba86b8497fa71f81fa771cf94d487efa10f3b5bf (diff) | |
download | rails-bbe9ee13e1828daf6c2c548d14dd93e2b75497b8.tar.gz rails-bbe9ee13e1828daf6c2c548d14dd93e2b75497b8.tar.bz2 rails-bbe9ee13e1828daf6c2c548d14dd93e2b75497b8.zip |
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
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/commands/server.rb | 8 | ||||
-rw-r--r-- | railties/lib/commands/servers/lighttpd.rb | 9 |
2 files changed, 13 insertions, 4 deletions
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" diff --git a/railties/lib/commands/servers/lighttpd.rb b/railties/lib/commands/servers/lighttpd.rb index df6ad663f9..488c7d61c4 100644 --- a/railties/lib/commands/servers/lighttpd.rb +++ b/railties/lib/commands/servers/lighttpd.rb @@ -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 |