mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-21 09:40:13 +01:00
Changes you will need to make: * In your environment.rb, you will need to update references to a few files per environment.rb.tmpl * In your environment.rb, you will need to specify the local time zone of the computer that is running your Tracks install. Other notes on my changes: * Modified our code to take advantage of Rails 2.1's slick time zone support. * Upgraded will_paginate for compatibility * Hacked the Selenium on Rails plugin, which has not been updated in some time and does not support Rails 2.1 * Verified that all tests pass on my machine, including Selenium tests -- I'd like confirmation from others, too.
39 lines
954 B
Ruby
39 lines
954 B
Ruby
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}"
|