vendredi 8 mai 2015

How do I add a dependency to a private gem in gemspec?

I'm trying to add a private gem dependency to a gemspec I'm writing. My Gemfile is:

source 'https://rubygems.org'

gemspec

gem 'my_private_gem', '0.0.1', :git => 'http://ift.tt/1ImdAWA'

And the relevant line in mygem.gemspec is:

spec.add_dependency 'my_private_gem', '0.0.1'

Now I thought this would work but after running gem build mygem and gem install ./mygem.gem I get: ERROR: Could not find a valid gem 'mygem' (= 0.0.1) in any repository.

What am I doing wrong?

Aucun commentaire:

Enregistrer un commentaire