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

Changing order of source blocks changes which gems are loaded from which source #5945

Closed
isen0011 opened this issue Aug 11, 2017 · 3 comments

Comments

@isen0011
Copy link

When I have a Gemfile that looks like this:

source 'https://rubygems.org' do
  ruby '2.4.1'
  gem 'rails', '~> 5.1.2'
end

source "https://artifactory.umn.edu/artifactory/api/gems/asr-rubygems/" do
  gem "lastpassify"
end

Bundler tries to load minitest (sub-requirement of rails) from the second source server:

Gem::RemoteFetcher::FetchError: too many connection resets
(https://isen0011:[email protected]/artifactory/api/gems/asr-rubygems/gems/minitest-5.10.3.gem)

But, if I change the order of the two source statements, so the Gemfile looks like this:

source "https://artifactory.umn.edu/artifactory/api/gems/asr-rubygems/" do
  gem "lastpassify"
end

source 'https://rubygems.org' do
  ruby '2.4.1'
  gem 'rails', '~> 5.1.2'
end

...everything installs correctly, with minitest loading from rubygems.org

repro script.
Note that I am using our internal artifactory server as a source for one of the two gems, which would need to be changed to make this work for anyone outside our organization.

@segiddins
Copy link
Member

All I get is

Could not fetch specs from
https://artifactory.umn.edu/artifactory/api/gems/asr-rubygems/

@colby-swandale
Copy link
Member

ping @isen0011

@segiddins
Copy link
Member

This will be fixed in Bundler 2 by #5985, so I'm going to close this out. Thanks for reporting it!

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

No branches or pull requests

3 participants