Sha256: 5c57875045b6f0a2d9fdfa2c70de77869982d991fa588cefb8c5bc5dbf459088

Contents?: true

Size: 954 Bytes

Versions: 11

Compression:

Stored size: 954 Bytes

Contents

require 'active_support'
require 'fileutils'

begin
  require_library_or_gem 'fcgi'
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", "new_mongrel", "webrick"
    ARGV.shift
  else
    if defined?(Mongrel)
      "mongrel"
    elsif RUBY_PLATFORM !~ /(:?mswin|mingw)/ && !silence_stderr { `lighttpd -version` }.blank? && defined?(FCGI)
      "lighttpd"
    else
      "webrick"
    end
end

case server
  when "webrick"
    puts "=> Booting WEBrick..."
  when "lighttpd"
    puts "=> Booting lighttpd (use 'script/server webrick' to force WEBrick)"
  when "mongrel", "new_mongrel"
    puts "=> Booting Mongrel (use 'script/server webrick' to force WEBrick)"
end

%w(cache pids sessions sockets).each { |dir_to_make| FileUtils.mkdir_p(File.join(RAILS_ROOT, 'tmp', dir_to_make)) }
require "commands/servers/#{server}"

Version data entries

11 entries across 11 versions & 5 rubygems

Version Path
radiant-0.7.2 vendor/rails/railties/lib/commands/server.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/railties/lib/commands/server.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/railties/lib/commands/server.rb
antfarm-0.3.0 rails/vendor/rails/railties/lib/commands/server.rb
antfarm-0.4.0 rails/vendor/rails/railties/lib/commands/server.rb
erails-2.1.2 lib/commands/server.rb
radiant-0.7.0 vendor/rails/railties/lib/commands/server.rb
radiant-0.7.1 vendor/rails/railties/lib/commands/server.rb
rails-2.1.0 lib/commands/server.rb
rails-2.1.2 lib/commands/server.rb
rails-2.1.1 lib/commands/server.rb