mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 00:08:50 +01:00
Upgraded to Rails 2.1. This can have wide ranging consequences, so please help track down any issues introduced by the upgrade. Requires environment.rb modifications.
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.
This commit is contained in:
parent
f3bae73868
commit
901a58f8a3
1086 changed files with 51452 additions and 19526 deletions
|
|
@ -62,7 +62,7 @@ config = IO.read(config_file)
|
|||
default_port, default_ip = 3000, '0.0.0.0'
|
||||
port = config.scan(/^\s*server.port\s*=\s*(\d+)/).first rescue default_port
|
||||
ip = config.scan(/^\s*server.bind\s*=\s*"([^"]+)"/).first rescue default_ip
|
||||
puts "=> Rails application starting on http://#{ip || default_ip}:#{port || default_port}"
|
||||
puts "=> Rails #{Rails.version} application starting on http://#{ip || default_ip}:#{port || default_port}"
|
||||
|
||||
tail_thread = nil
|
||||
|
||||
|
|
|
|||
|
|
@ -32,12 +32,12 @@ ARGV.clone.options do |opts|
|
|||
opts.parse!
|
||||
end
|
||||
|
||||
puts "=> Rails application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
|
||||
puts "=> Rails #{Rails.version} application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
|
||||
|
||||
parameters = [
|
||||
"start",
|
||||
"-p", OPTIONS[:port].to_s,
|
||||
"-a", OPTIONS[:ip].to_s,
|
||||
parameters = [
|
||||
"start",
|
||||
"-p", OPTIONS[:port].to_s,
|
||||
"-a", OPTIONS[:ip].to_s,
|
||||
"-e", OPTIONS[:environment],
|
||||
"-P", "#{RAILS_ROOT}/tmp/pids/mongrel.pid"
|
||||
]
|
||||
|
|
@ -50,12 +50,12 @@ else
|
|||
|
||||
start_debugger if OPTIONS[:debugger]
|
||||
|
||||
require 'initializer'
|
||||
Rails::Initializer.run(:initialize_logger)
|
||||
|
||||
puts "=> Call with -d to detach"
|
||||
puts "=> Ctrl-C to shutdown server"
|
||||
tail_thread = tail(Pathname.new("#{File.expand_path(RAILS_ROOT)}/log/#{RAILS_ENV}.log").cleanpath)
|
||||
|
||||
log = Pathname.new("#{File.expand_path(RAILS_ROOT)}/log/#{RAILS_ENV}.log").cleanpath
|
||||
open(log, (File::WRONLY | File::APPEND | File::CREAT)) unless File.exist? log
|
||||
tail_thread = tail(log)
|
||||
|
||||
trap(:INT) { exit }
|
||||
|
||||
|
|
|
|||
16
vendor/rails/railties/lib/commands/servers/new_mongrel.rb
vendored
Normal file
16
vendor/rails/railties/lib/commands/servers/new_mongrel.rb
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
unless defined?(Mongrel)
|
||||
abort "PROBLEM: Mongrel is not available on your system (or not in your path)"
|
||||
end
|
||||
|
||||
require 'rails/mongrel_server/commands'
|
||||
|
||||
GemPlugin::Manager.instance.load "rails::mongrel" => GemPlugin::INCLUDE, "rails" => GemPlugin::EXCLUDE
|
||||
|
||||
case ARGV[0] ||= 'start'
|
||||
when 'start', 'stop', 'restart'
|
||||
ARGV[0] = "rails::mongrelserver::#{ARGV[0]}"
|
||||
end
|
||||
|
||||
if not Mongrel::Command::Registry.instance.run ARGV
|
||||
exit 1
|
||||
end
|
||||
|
|
@ -61,6 +61,6 @@ require 'webrick_server'
|
|||
|
||||
OPTIONS['working_directory'] = File.expand_path(RAILS_ROOT)
|
||||
|
||||
puts "=> Rails application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
|
||||
puts "=> Rails #{Rails.version} application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
|
||||
puts "=> Ctrl-C to shutdown server; call with --help for options" if OPTIONS[:server_type] == WEBrick::SimpleServer
|
||||
DispatchServlet.dispatch(OPTIONS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue