nemo
nemo

Reputation: 485

Getting gems added to bundle install from the local gem repository

I am trying to understand how bundle install resolves dependencies for a ruby project. I have all the required gems in the path where bundle install would download its gems to, but only when I run bundle install do those gems become available to my ruby code. For example, mongrel is available under the gem path but the line require 'mongrel' only finds it after I run bundle install. Otherwise it throws an error saying the file is not found.

Since I already have all the gems in the gem repo, would there be a way to get the project to know about those files and resolve them without having to issue a bundle install?

Upvotes: 0

Views: 241

Answers (1)

phoet
phoet

Reputation: 18845

no. bundler uses the Gemfile.lock to resolve the dependencies. if you did not run bundle install the Gemfile.lock would not be updated.

if you want to use your locally installed gems, you can run bundle install --local

Upvotes: 1

Related Questions