RubyGems file formatEdit
A .gem package is a .tar archive containing:
- a
.tar.gzarchive of contents; and - a
.gzfile containing metadata (in YAML format) - a
.gzfile containing checksums (also in YAML format)
To break out the outer archive:
$ tar xvf somegem-0.0.1.gem
x metadata.gz
x data.tar.gz
x checksums.yaml.gz
To inspect or break out the metadata:
$ zless metadata.gz
$ gunzip metadata.gz
To inspect or break out the checksums:
$ zless checksums.yaml.gz
$ gunzip checksums.yaml.gz
To extract the contents:
$ tar xzvf data.tar.gz