Posted 17 days ago. Visible to the public.

Bundler error: Downloading gem revealed dependencies not in the API

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).

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.

Growing Rails Applications in Practice
Check out our new e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Author of this card:

Dominik Schöler
Last edit:
12 days ago
by Arne Hartherz
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Dominik Schöler to makandra dev