Skip to content

Instantly share code, notes, and snippets.

@crguezl
Created July 6, 2012 07:48
Show Gist options
  • Save crguezl/3058757 to your computer and use it in GitHub Desktop.
Save crguezl/3058757 to your computer and use it in GitHub Desktop.
Returns the path where the gem being used is installed. '$ gempath.rb sinatra'
#!/usr/bin/env ruby
spec = Gem::Specification.find_by_name(ARGV.shift)
puts spec.gem_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment