Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Find the path of the Gem given. Toss this in your ~/.bashrc or ~/.profile
- # Usage:
- # $ gempath mechanize
- # /Library/Ruby/Gems/1.8/gems/mechanize-0.9.3
- #
- # My use case: open up the gem code to inspect it.
- # $ mate `gempath mechanize`
- alias gempath='ruby -rubygems -e "puts Gem.cache.find_name(ARGV.first).first.loaded_from.gsub(/specifications/, %q(gems)).gsub(/\.gemspec/, %q())"'
Add Comment
Please, Sign In to add comment