Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using bundler, how do you unpack a gem installed via a git repository?

How can I unpack a gem specified in bundler by a :git => url?

My Gemfile has

gem 'my_gem', :git => '[email protected]:xxxxx/xxxxx.git'

$ bundle correctly reports the gem as available, and my code works. $ bundle which my_gem even tells me where my gem is stored. However:

$ gem unpack my_gem
ERROR:  Gem 'my_gem' not installed nor fetchable.
$ bundle exec gem unpack my_gem
ERROR:  Gem 'my_gem' not installed nor fetchable.

Is it possible to unpack a gem installed like this?

like image 470
Gareth Avatar asked Feb 22 '23 21:02

Gareth


1 Answers

Why the need to unpack it? You already have the sourcecode. The point of specifying a git repository is that you don't have a bundled gem, but the source to generate it.

Simply use

git clone git://github.com/xxxx/yyy.git

and the source will be in the yyy folder of the current directory.

like image 102
Femaref Avatar answered Feb 26 '23 07:02

Femaref