Skip to content

Instantly share code, notes, and snippets.

@jordelver
Created December 21, 2012 11:18
Show Gist options
  • Save jordelver/4352220 to your computer and use it in GitHub Desktop.
Save jordelver/4352220 to your computer and use it in GitHub Desktop.
Move a deprecated gem into vendor/gems

Move a deprecated gem into vendor/gems

If a gem gets pulled from rubygems.org, but you still have it locally (or can get hold of it somehow), you can move the gem into your vendor/gems directory.

Unpack the gem into vendor/gems

gem unpack <gem-name> --target vendor/gems

Edit the Gemfile to match

gem '<gem-name>', :path => 'vendor/gems/<gem-directory>'

If you get errors such as:

config.gem: Unpacked gem <gem-name> in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.

But when you run rake gems:refresh_specs it fails :( Do this:

cd vendor/gems/<gem-name>

gem specification <gem-name> > .specification

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment