Skip to content

Instantly share code, notes, and snippets.

@jashmenn
Created September 10, 2008 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jashmenn/9998 to your computer and use it in GitHub Desktop.
Save jashmenn/9998 to your computer and use it in GitHub Desktop.
# Function to check for a minimum rubygems version
#
# Can be found at: http://gist.github.com/9998
def check_rubygems_version
min_version = '1.2.0'
local_version = %x[gem --version].chomp
unless local_version >= min_version
puts "You need to update the RubyGems utility to #{min_version} using the following"
puts ""
puts " sudo gem update --system"
end
end
check_rubygems_version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment