Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

bundle install doesn't search referenced gems in all sources #3381

Closed
krumts opened this issue Feb 6, 2015 · 7 comments
Closed

bundle install doesn't search referenced gems in all sources #3381

krumts opened this issue Feb 6, 2015 · 7 comments

Comments

@krumts
Copy link

krumts commented Feb 6, 2015

I am using bundler 1.7.12 and have currently the following issue:

I have a Gemfile specifying multiple sources - one is a private geminabox repo containing some patched gems, and the second is rubygems.org from which I expect to get the rest.

# use an internal gem repo for patched gems
source "https://rubygems.org"

gem "colorize"
gem "erubis"

source "http://somerepo/geminabox" do
  gem "gem_a", "1.0.1"
  gem "gem_b", "1.0.1"
end

Additionally gem_a has a dependency on fog 1.23.0, and (I think this is causing the issue) in the private repo there is a very old version of fog (1.5.x).

The result at the end is:

Could not find gem 'fog (~> 1.23.0) ruby', which is required by gem 'gem_a (= 1.0.1) ruby', in any of the sources.

Fog is definitely available on rubygems.org in the required version, but it seems that bundler doesn't fall back to search it there if a different version is available in the private repo.

Calling bundle install --full-index helps - it installs the bundle properly, however I am not sure this is the right thing to do.

I looked for similar issues:

Therefore decided to open a new one.

@alex-ross
Copy link

Got the same issue with that version

@felixbuenemann
Copy link
Contributor

Same issue on 1.7.12, using --full-index helped. I'm also using the rails-assets.org source if that matters.

indirect added a commit that referenced this issue Feb 8, 2015
If a gem is present in a git or path source, we can stop asking remotes
about it. If a gem is present in a Rubygems source, we still need to ask
all the other sources about it so that we can warn about gems that are
available from multiple sources.

Fixes #3368, #3377, #3300, #3381
@TimMoore
Copy link
Contributor

TimMoore commented Feb 9, 2015

This should be fixed in 1.7.13. Please try upgrading and let us know if you still have any problems.

@TimMoore TimMoore closed this as completed Feb 9, 2015
@krumts
Copy link
Author

krumts commented Feb 9, 2015

Works fine now. Thanks a lot for the fix!

@idoa01
Copy link

idoa01 commented Apr 27, 2015

I'm using version 1.9.4 of bundler and I'm still having the same issue
Gemfile:

source 'https://rubygems.org'

source "http://somerepo/geminabox" do
  gem "gem_a", ">=0.2.0"
end

gem_a depends on bunny and I'm getting the following error:

Fetching source index from http://somerepo/geminabox
Fetching gem metadata from https://rubygems.org/..
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bunny":
  In Gemfile:
    gem_a (>= 0.2.0) ruby depends on
      bunny (~> 0.9.0.pre7) ruby
Could not find gem 'bunny (~> 0.9.0.pre7) ruby', which is required by gem 'gem_a (>= 0.2.0) ruby', in any of the sources.

bundle env:

    Bundler   1.9.4
    Rubygems  2.4.5
    Ruby      2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]

    RVM       1.26.9 (latest)
    Git       1.9.1
    rubygems-bundler (1.4.4)

@indirect
Copy link
Member

Thanks for reporting this issue! Since the problem on this ticket is solved, please open a new ticket, and describe: 1) what you did, 2) what happened, and 3) what you expected to happen.

@idoa01
Copy link

idoa01 commented Apr 27, 2015

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants