diff options
Diffstat (limited to 'railties/lib/commands/server.rb')
-rw-r--r-- | railties/lib/commands/server.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/lib/commands/server.rb b/railties/lib/commands/server.rb index 1a8d3fd29d..c61a4388d5 100644 --- a/railties/lib/commands/server.rb +++ b/railties/lib/commands/server.rb @@ -7,13 +7,19 @@ rescue Exception # FCGI not available end +begin + require_library_or_gem 'mongrel' +rescue Exception + # Mongrel not available +end + server = case ARGV.first when "lighttpd", "mongrel", "webrick" ARGV.shift else if RUBY_PLATFORM !~ /mswin/ && !silence_stderr { `lighttpd -version` }.blank? && defined?(FCGI) "lighttpd" - elsif !silence_stderr { `mongrel_rails -v` }.blank? + elsif defined?(Mongrel) "mongrel" else "webrick" |