How to unpack a gem for local usage?

This bugged me for a while, so I decided to make a note to self for future reference.
If you try to include the gem in your bundle (e.g. for a rails app), you need to unpack the gemspec too.

The commands are:
 $ gem unpack gemname --target vendor/gems
 $ cd vendor/gems/gemname-VERSION
 $ gem unpack gemname --spec
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s