Skip to content

Commit

Permalink
Update testing boot.rb for Ruby 1.9 compat.
Browse files Browse the repository at this point in the history
This brings the file up-to-date with a freshly generated Rails 2.3.2 boot.rb.
  • Loading branch information
Dean Strelau committed Jun 3, 2009
1 parent 7d9efa4 commit f062a69
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/rails_root/config/boot.rb
Expand Up @@ -44,6 +44,7 @@ class VendorBoot < Boot
def load_initializer
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
Rails::Initializer.run(:install_gem_spec_stubs)
Rails::GemDependency.add_frozen_gem_path
end
end

Expand All @@ -67,7 +68,7 @@ def load_rails_gem

class << self
def rubygems_version
Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
Gem::RubyGemsVersion rescue nil
end

def gem_version
Expand All @@ -82,14 +83,14 @@ def gem_version

def load_rubygems
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.)
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
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

Expand Down

0 comments on commit f062a69

Please sign in to comment.