$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.)
exit1
end
class<<self
defrubygems_version
Gem::RubyGemsVersionrescuenil
end
defgem_version
ifdefined?RAILS_GEM_VERSION
RAILS_GEM_VERSION
elsifENV.include?('RAILS_GEM_VERSION')
ENV['RAILS_GEM_VERSION']
else
parse_gem_version(read_environment_rb)
end
end
defload_rubygems
require'rubygems'
min_version='1.3.1'
unlessrubygems_version>=min_version
$stderr.puts%Q(Rails requires RubyGems >= #{min_version}(you have #{rubygems_version}). Please `gem update --system` and try again.)