Read more

Bundler error: Downloading gem revealed dependencies not in the API

Dominik Schöler
April 04, 2018Software engineer at makandra GmbH

Recent Bundler (1.16.1) started complaining about missing dependencies in the Gemfile. This is due to a stricter handling of specifications (see attached link).

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

The error message looks like this:

Downloading example-gem-1.2.3 revealed dependencies not in the API or the lockfile (other-gem (< 3)).
Either installing with `--full-index` or running `bundle update example-gem` should fix the problem.

However, bundle install --full-index did not any better for me, and bundle update is not always a viable solution.

Easiest solution

Open Gemfile.lock and add the dependencies manually by looking for example-gem and adding its dependencies underneath. You may even copy them from the error message.

...

GEM
  specs:
    ...
    example-gem (1.2.3)
+     other-gem (< 3)
    
DEPENDENCIES
  ... 

bundle install should succeed now. If it doesn't, you have probably screwed its syntax. Check your Gemfile.lock again.

Posted by Dominik Schöler to makandra dev (2018-04-04 14:34)