-
-
Notifications
You must be signed in to change notification settings - Fork 2k
bundle path confusing behavior #6619
Comments
Does his happen for gems that are not default gems ? (Rake is a default gem, installed with ruby) |
@segiddins Yes, this happens for all gems - rake was simply an easy example. |
@segiddins Also note the version of rake. Ruby 2.4.4 comes bundled with 12.0.0, whereas in all of the examples the installed version is 12.3.1. |
I'm unable to reproduce this:
|
@segiddins could you please share your full |
@segiddins Also, can you please check if the current location of rake gem will be used after you do $ bundle config --local path ~/.tmp-bundle
$ bundle up ? |
|
Environment
Bundler Build Metadata
Bundler settings
GemfileGemfilesource 'https://rubygems.org'
gem 'rake' Gemfile.lock
|
So the installation path differs for you as well. Local and global setting result in different gem installations (just like I described in |
Yes, that's "intended" that local & global settings for |
did we finally fix that under a 2.0 feature flag? it's definitely on my list of "ugh god we should finally fix that in 2.0" |
@indirect I don't think so, mostly since I'm not even sure which way 'fixing' it would be :P |
@segiddins we have definitely concluded in the past that fixing it means making all install paths include the ABI version. It's too weird to set a global path and then break all your gems every time you switch rubies. |
…ope, r=indirect [Settings] Append the ruby scope on Bundler 2 with a global path setting ### What was the end-user problem that led to this PR? The problem was `bundle config path` behaving differently depending on whether the config is local or global was... confusing. Closes #6619 (comment). ### What was your diagnosis of the problem? My diagnosis was setting the `path` setting should be consistent, regardless of the level of configuration it is set at. ### What is your fix for the problem, implemented in this PR? My fix appends the "ruby scope" to the path when set globally on Bundler 2. ### Why did you choose this fix out of the possible options? I chose this fix because it means users won't have to re-install gems when switching rubies with a global `BUNDLE_PATH` set.
Pardon my ignorance, but is there an approximate release date set for 2.0? |
@pegasd not yet |
…ope, r=colby-swandale [Settings] Append the ruby scope on Bundler 2 with a global path setting ### What was the end-user problem that led to this PR? The problem was `bundle config path` behaving differently depending on whether the config is local or global was... confusing. Closes #6619 (comment). ### What was your diagnosis of the problem? My diagnosis was setting the `path` setting should be consistent, regardless of the level of configuration it is set at. ### What is your fix for the problem, implemented in this PR? My fix appends the "ruby scope" to the path when set globally on Bundler 2. ### Why did you choose this fix out of the possible options? I chose this fix because it means users won't have to re-install gems when switching rubies with a global `BUNDLE_PATH` set.
…ope, r=colby-swandale [Settings] Append the ruby scope on Bundler 2 with a global path setting ### What was the end-user problem that led to this PR? The problem was `bundle config path` behaving differently depending on whether the config is local or global was... confusing. Closes #6619 (comment). ### What was your diagnosis of the problem? My diagnosis was setting the `path` setting should be consistent, regardless of the level of configuration it is set at. ### What is your fix for the problem, implemented in this PR? My fix appends the "ruby scope" to the path when set globally on Bundler 2. ### Why did you choose this fix out of the possible options? I chose this fix because it means users won't have to re-install gems when switching rubies with a global `BUNDLE_PATH` set. (cherry picked from commit 0fc64a6)
…ope, r=colby-swandale [Settings] Append the ruby scope on Bundler 2 with a global path setting ### What was the end-user problem that led to this PR? The problem was `bundle config path` behaving differently depending on whether the config is local or global was... confusing. Closes #6619 (comment). ### What was your diagnosis of the problem? My diagnosis was setting the `path` setting should be consistent, regardless of the level of configuration it is set at. ### What is your fix for the problem, implemented in this PR? My fix appends the "ruby scope" to the path when set globally on Bundler 2. ### Why did you choose this fix out of the possible options? I chose this fix because it means users won't have to re-install gems when switching rubies with a global `BUNDLE_PATH` set. (cherry picked from commit 0fc64a6)
…ope, r=colby-swandale [Settings] Append the ruby scope on Bundler 2 with a global path setting ### What was the end-user problem that led to this PR? The problem was `bundle config path` behaving differently depending on whether the config is local or global was... confusing. Closes #6619 (comment). ### What was your diagnosis of the problem? My diagnosis was setting the `path` setting should be consistent, regardless of the level of configuration it is set at. ### What is your fix for the problem, implemented in this PR? My fix appends the "ruby scope" to the path when set globally on Bundler 2. ### Why did you choose this fix out of the possible options? I chose this fix because it means users won't have to re-install gems when switching rubies with a global `BUNDLE_PATH` set. (cherry picked from commit 0fc64a6)
…ope, r=colby-swandale [Settings] Append the ruby scope on Bundler 2 with a global path setting ### What was the end-user problem that led to this PR? The problem was `bundle config path` behaving differently depending on whether the config is local or global was... confusing. Closes rubygems/bundler#6619 (comment). ### What was your diagnosis of the problem? My diagnosis was setting the `path` setting should be consistent, regardless of the level of configuration it is set at. ### What is your fix for the problem, implemented in this PR? My fix appends the "ruby scope" to the path when set globally on Bundler 2. ### Why did you choose this fix out of the possible options? I chose this fix because it means users won't have to re-install gems when switching rubies with a global `BUNDLE_PATH` set.
Environment:
Steps to reproduce:
% bundle config Settings are listed in order of priority. The top value will be used.
Behavior 1
Attempt to set path using global config
Expected location of installed gems:
~/.bundle
Actual location of installed gems:
~/.rvm/gems
(this is the "system" gem location)Behavior 2
Attempt to disable system path
Expected location of installed gems:
~/.bundle
Actual location of installed gems:
~/.bundle
(non Ruby-version dependent)Behavior 3
Attempt to set path locally
Expected location of installed gems:
~/.bundle
Actual location of installed gems:
~/.bundle
(Ruby-version dependent)Questions, thoughts
.bundle/config
files all over my apps (behavior 3
), which does not seem very user-friendly. How do I make a global configuration that behaves like this?behavior 1
not doing the same asbehavior 3
?behavior 2
works (almost well), why arepath
andpath.system
considered mutually exclusive?The text was updated successfully, but these errors were encountered: