Avoiding user-gem conflicts with system Ruby #1520
Replies: 2 comments 3 replies
-
I changed my mind about this. Changing is OK as long as the new generator simply appends a suffix to it. I was thinking about In Gentoo I'm solving this issue by appending
|
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for exploring this option! I have no strong opinions on this yet, but I'm curious to know and understand more. You mentioned a "conflict" of sorts. How does this conflict play out for a typical user? I'm wondering what is the concrete issue being solved here. |
Beta Was this translation helpful? Give feedback.
-
I'm thinking of ways so user gems get to be installed to a different directory and so rbenv's installed Rubies don't use the default
user_dir
which is either"#{ENV['HOME']}/.gem/#{RbConfig::CONFIG['ruby_version']}"
or"#{ENV['HOME']}/.local/share/gem/#{RbConfig::CONFIG['ruby_version']}"
.One of it is to append "-rbenv" to the version of every rbenv-installed Ruby. Question is, is it the best approach for rbenv, and is it (or ruby-build) currently configurable to do so?
If it's not configurable, are there parts of the code (in either rbenv or ruby-build) that I could examine so I can perhaps modify them?
For reference, here's the definition of
Gem.user_dir
. I don't think overriding the way these values are generated is a good idea as these values might again change in the future. Better just changeRbConfig::CONFIG["ruby_version"]
.Also here's the definition of
Gem.data_home
:Beta Was this translation helpful? Give feedback.
All reactions