0

I have a Gem project that has the following in the mygem.gemspec file:

Gem::Specification.new do |s|

  s.add_dependency 'some_other_gem'

end

Everything builds and publishes just fine for the Gem.

In my Rails projects that use it, I have the following in my Gemfile:

source 'http://abc123@gem.fury.io/my_user/' do
  gem 'mygem', '1.12'
end

When I run my projects, I need to explicitly add the following in the Gemfile or else I wind up with dependency errors:

'some_other_gem', '3.14'

source 'http://abc123@gem.fury.io/my_user/' do
  gem 'mygem', '1.12'
end

Project's Rails version is 5.0.6 running on Ruby 2.3.1.

Is there more necessary than just s.add_dependency in my mygem.gemspec file?

el n00b
  • 1,957
  • 7
  • 37
  • 64
  • I have never seen the `"=3.14"` syntax before. I think `"3.14"` (i.e. without the equals sign) is preferred. Also: when you say "dependency errors", could you be more specific? Can you post the error? – Matt Brictson Jul 03 '18 at 02:59
  • I was trying to create a project to simulate the issue but cannot reproduce it. It is only happening in one of my projects so I'll need to dig a little more to get the errors (it's not an easy app to run locally). I'll get it here as soon as I can. – el n00b Jul 03 '18 at 13:35
  • I cannot reproduce it at all now. It must have just been a fluke. :confused: – el n00b Jul 03 '18 at 14:39
  • Are you sure that version `1.12` of `mygem` published in gem.fury does depend on `my_other_gem`? Or was that dependency added on a later version? – grzuy Jul 24 '18 at 02:38

0 Answers0