Guest User

Untitled

a guest
Apr 26th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. # Find the path of the Gem given. Toss this in your ~/.bashrc or ~/.profile
  2. # Usage:
  3. # $ gempath mechanize
  4. # /Library/Ruby/Gems/1.8/gems/mechanize-0.9.3
  5. #
  6. # My use case: open up the gem code to inspect it.
  7. # $ mate `gempath mechanize`
  8. 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