Mercurial > hg > soundsoftware-site
diff config/boot.rb @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | 8661b858af72 |
children | 433d4f72a19b |
line wrap: on
line diff
--- a/config/boot.rb Fri Feb 24 18:36:29 2012 +0000 +++ b/config/boot.rb Fri Feb 24 19:09:32 2012 +0000 @@ -1,6 +1,11 @@ # Don't change this file! # Configure your app in config/environment.rb and config/environments/*.rb +if RUBY_VERSION >= '1.9' + require 'yaml' + YAML::ENGINE.yamler = 'syck' +end + RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) module Rails @@ -62,8 +67,12 @@ gem 'rails' end rescue Gem::LoadError => load_error - $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.) - exit 1 + if load_error.message =~ /Could not find RubyGem rails/ + STDERR.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.) + exit 1 + else + raise + end end class << self @@ -106,17 +115,5 @@ end end -# TODO: Workaround for #7013 to be removed for 1.2.0 -# Loads i18n 0.4.2 before Rails loads any more recent gem -# 0.5.0 is not compatible with the old interpolation syntax -# Plugins will have to migrate to the new syntax for 1.2.0 -require 'rubygems' -begin - gem 'i18n', '0.4.2' -rescue Gem::LoadError => load_error - $stderr.puts %(Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`) - exit 1 -end - # All that for this: Rails.boot!