From 50a45cfa7d4f498d50b3494a5fbf7d453fb61093 Mon Sep 17 00:00:00 2001 From: benni Date: Fri, 6 May 2011 20:07:54 +0200 Subject: [PATCH] Updated config/boot.rb to rails 2.3.10 --- config/boot.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/config/boot.rb b/config/boot.rb index 13ccb5c2..97edd24d 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -62,8 +62,12 @@ module Rails 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 @@ -82,8 +86,8 @@ module Rails end def load_rubygems + min_version = '1.3.2' require 'rubygems' - min_version = '1.3.1' unless rubygems_version >= min_version $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.) exit 1 @@ -99,9 +103,9 @@ module Rails end private - def read_environment_rb - File.read("#{RAILS_ROOT}/config/environment.rb") - end + def read_environment_rb + File.read("#{RAILS_ROOT}/config/environment.rb") + end end end end