How Do You Solve “Could not find foobar in any of the sources” after a bundle Command?

Problem scenario
You run a bundle command (e.g., bundle exec foobar create). It fails with an error such as "Could not find foobar in any of the sources".

What should you do?

Remove the relevant Gemfile.lock file (e.g., in the directory you are running bundle) if you are allowed to. Are you using a variety of bundle commands? Each one could create a Gemfile.lock file so be aware of this. To learn more about the basics of bundle, see this.

If you cannot delete the Gemfile.lock file, try this external posting.

Leave a comment

Your email address will not be published. Required fields are marked *