Created
December 29, 2009 20:42
-
-
Save perplexes/265584 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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())"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment