poymode
poymode

Reputation: 1559

where does bundler get its dependencies?

I specified a custom gem repo source for bundler.

Some gem dependencies are not in my repo.

Let say I have rails 2.3.11 in my own repo but I don't have any of it's dependencies on my repo

e.g

rails (2.3.11)
  actionmailer (= 2.3.11)
  actionpack (= 2.3.11)
  activerecord (= 2.3.11)
  activeresource (= 2.3.11)
  activesupport (= 2.3.11)
  rake (>= 0.8.3)

but it would still install rails' dependencies. Does it have a DEFAULT gem repo source?

Upvotes: 0

Views: 246

Answers (1)

Henry Collingridge
Henry Collingridge

Reputation: 1970

No, bundler does not have a default source.

  • If all the gems specified are available locally (i.e. in vendor/cache or installed locally via "gem install"), then it will use those and your bundle will be complete.
  • When bundler encounters a gem it can't find locally, then your Gemfile must have a source. If there is no source specified, you'll get

    Your Gemfile doesn't have any sources. You can add one with a line like 'source :rubygems'

  • If bundler can't find a specified gem locally or in the source(s) you have specified (e.g. your own repository), then you'll get

    Could not find blah in any of the sources.

If you have run bundle install against your own repository, you don't have any other sources listed, and it worked when you didn't expect it to, then I would guess that it's using gems already on your machine.

Upvotes: 1

Related Questions