Skip to content

Instantly share code, notes, and snippets.

@workmad3
Created June 16, 2010 13:40
Show Gist options
  • Select an option

  • Save workmad3/440695 to your computer and use it in GitHub Desktop.

Select an option

Save workmad3/440695 to your computer and use it in GitHub Desktop.
def load_rubygems
min_version = '1.3.2'
require 'rubygems'
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 => e
$stderr.puts e
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
exit 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment