Skip to content

Instantly share code, notes, and snippets.

@erebor
Created June 12, 2010 17:57
Show Gist options
  • Save erebor/435933 to your computer and use it in GitHub Desktop.
Save erebor/435933 to your computer and use it in GitHub Desktop.
Mac:~/cas(working) ruby-1.8.7-p174> cat $(which gem)
#!/Users/rew/.rvm/rubies/ruby-1.8.7-p174/bin/ruby
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++
require 'rubygems'
require 'rubygems/gem_runner'
require 'rubygems/exceptions'
required_version = Gem::Requirement.new ">= 1.8.6"
unless required_version.satisfied_by? Gem.ruby_version then
abort "Expected Ruby Version #{required_version}, is #{Gem.ruby_version}"
end
args = ARGV.clone
begin
Gem::GemRunner.new.run args
rescue Gem::SystemExitException => e
exit e.exit_code
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment