aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2011-07-04 10:44:59 +0100
committerLouise Crow <louise.crow@gmail.com>2011-07-04 10:44:59 +0100
commit7699608ba4113297d99f85f802651b445061aa8e (patch)
tree85e1c2db302bda3b6d5259ad70e391144c545762
parent163bcabab19ede62755aedf9716336d8751060ff (diff)
Update boot.rb, update rails gem version
-rw-r--r--config/boot.rb18
-rw-r--r--config/environment.rb2
2 files changed, 13 insertions, 7 deletions
diff --git a/config/boot.rb b/config/boot.rb
index 6c9eec96a..90fd9cd4d 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -72,13 +72,17 @@ 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
def rubygems_version
- Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
+ Gem::RubyGemsVersion rescue nil
end
def gem_version
@@ -92,15 +96,16 @@ module Rails
end
def load_rubygems
+ min_version = '1.3.2'
require 'rubygems'
- unless rubygems_version >= '0.9.4'
- $stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
+ 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
end
rescue LoadError
- $stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
exit 1
end
@@ -117,6 +122,7 @@ module Rails
end
+
# All that for this:
Rails.boot!
diff --git a/config/environment.rb b/config/environment.rb
index 33be4a060..28598a9ef 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -6,7 +6,7 @@
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.3.11' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')