Skip to content

Instantly share code, notes, and snippets.

@toddsampson
Created November 13, 2013 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toddsampson/7456391 to your computer and use it in GitHub Desktop.
Save toddsampson/7456391 to your computer and use it in GitHub Desktop.
Gist for Discovering if a Gem was Installed blog post: http://www.cloudspace.com/blog/?s=Is+this+gem+installed%3F
dependency = Gem::Dependency.new "authlogic", ">2"
specs = Gem.source_index.search dependency
puts "the gem is not installed" if specs.empty?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment