You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Global vs block gem server source priority doesn't work as expected #3982
Bundler should try to resolve using the private source for my-private-gem and all of its indirect dependencies. Only if a valid resolution is not found, it should also consider rubygems.org for those dependencies.
Insted, Bundle will still install my-another-private-gem from rubygems.org if the gem exists there. We should probably search first in the same source as my-private-gem before falling back.
changed the title [-]Global vs block rubygems source priority doesn't work as expected[/-][+]Global vs block gem sever source priority doesn't work as expected[/+]on Sep 30, 2020
changed the title [-]Global vs block gem sever source priority doesn't work as expected[/-][+]Global vs block gem server source priority doesn't work as expected[/+]on Sep 30, 2020
For implicit gems (dependencies of explicit gems), any source, git, or path repository declared on the parent. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from rubygems.org
which is the expected behavior as per the issue but not observed.
#4609 should fix this and make bundler behave as documented.
Note that the solution slightly differs from what I originally proposed in the sense that if a scoped source includes any version of my-private-gem, the gem will be picked up from there. Falling back to the default source would only happen if the name does not exist at all in the scoped source.
As I originally proposed it, the fallback would also happen if the scoped source includes my-private-gem but not a version that matches all requirements. With this solution, bundler will fail to resolve claiming that it couldn't find a compatible version of my-private-gem in https://my-private-server. I can't make the original proposal work since my approach is to resolve sources for each involved gem name beforehand before resolution even starts.
I think this solution matches the documentation exactly, and it's what users intuitively expect, so seems fine to me.
Activity
[-]Global vs block rubygems source priority doesn't work as expected[/-][+]Global vs block gem sever source priority doesn't work as expected[/+][-]Global vs block gem sever source priority doesn't work as expected[/-][+]Global vs block gem server source priority doesn't work as expected[/+]sonalkr132 commentedon Feb 11, 2021
Can confirm this issue exists. bundler doc says:
which is the expected behavior as per the issue but not observed.
deivid-rodriguez commentedon May 24, 2021
#4609 should fix this and make bundler behave as documented.
Note that the solution slightly differs from what I originally proposed in the sense that if a scoped source includes any version of
my-private-gem, the gem will be picked up from there. Falling back to the default source would only happen if the name does not exist at all in the scoped source.As I originally proposed it, the fallback would also happen if the scoped source includes
my-private-gembut not a version that matches all requirements. With this solution, bundler will fail to resolve claiming that it couldn't find a compatible version ofmy-private-geminhttps://my-private-server. I can't make the original proposal work since my approach is to resolve sources for each involved gem name beforehand before resolution even starts.I think this solution matches the documentation exactly, and it's what users intuitively expect, so seems fine to me.