t56k
t56k

Reputation: 6981

How do I explore the source of a gem that isn't installed?

I just have the gem on my desktop. How can I inspect it's source in Sublime Text or Xcode or anything really? I know I can check installed gems out with Sublime Text, what about uninstalled ones?

Upvotes: 0

Views: 92

Answers (2)

Amadan
Amadan

Reputation: 198294

If you don't have the gem tool either (unlikely, but just in case), a gem is a tar archive with several gz and tar.gz files in it, so you can get the contents using the standard tar and gzip utilities.

Upvotes: 0

cpjolicoeur
cpjolicoeur

Reputation: 13106

gem unpack foo.gem then just go into the foo/ directory

see http://guides.rubygems.org/command-reference/#gem_unpack

Upvotes: 2

Related Questions