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
Looking into #5327 and similar, I believe that RubyGems would deserve second look at where the gems are installed.
First and foremost, RubyGems were historically designed to well support multiple install locations. There essentially were just Gem.default_path and Gem.default_dir. The first was list of all paths where gems were stored and the Gem.default_dir was the location, where the gems were installed by default. Please note that these were times, where RubyGems were 3rd partly library and there were no gems shipped as part of Ruby.
Later, RubyGems became part of StdLib and first gems started to be part of Ruby. Unfortunately, the Gem.default_dir meaning somehow drifted at this time. While it still was the default installation location, it also become the location of gems which are part of StdLib.
And this is very unfortunate situation. In older days, without bundled and default gems, Fedora was using this operating_system.rb to configure where to install system wide available gems. Unfortunately, with the evolution as I described above and introduction of bundled/default gems, changing Gem.default_dir configuration also meant that there were suddenly missing the default/bundled gems. So Fedora adapted and this is the current version of operating_system.rb. It uses standard command line options, but these unfortunately has different side effects.
Now back to the context of #5327, can we make sure that:
All gem directories are treated the same. Currently, there is essentially single location and using any other location has their issues (this resulted in hackish implementation of default gems, where they could have been just different location).
Don't treat user home installed gems any special.
Let the vendor configure what is their default location easily.
Maybe the first good step could be to free the StdLib gems from the Gem.default_dir and give the Gem.default_dir the old meaning, which was just the default install location. Nothing more nothing less.
The text was updated successfully, but these errors were encountered:
I think this ^^ ticket extracts my last thought (Maybe the first good step could be to free the StdLib gems from the Gem.default_dir and give the Gem.default_dir the old meaning, which was just the default install location. Nothing more nothing less.) into separate ticket, which is more relevant for Ruby itself. Thx for providing the link here.
I agree that separating things, especially stdlib gems, from Gem.default_dir makes sense. We should make sure this information is exposed for debugging purposes, though — e.g. as other Gem.???_dir functions and in the output of gem env.
user-install is treated quite specially right now
This actually improved quite a bit recently, because of #7100 (by @voxik). gem install --user-install now just sets --install-dir to Gem.user_dir.
Looking into #5327 and similar, I believe that RubyGems would deserve second look at where the gems are installed.
First and foremost, RubyGems were historically designed to well support multiple install locations. There essentially were just
Gem.default_path
andGem.default_dir
. The first was list of all paths where gems were stored and theGem.default_dir
was the location, where the gems were installed by default. Please note that these were times, where RubyGems were 3rd partly library and there were no gems shipped as part of Ruby.Later, RubyGems became part of StdLib and first gems started to be part of Ruby. Unfortunately, the
Gem.default_dir
meaning somehow drifted at this time. While it still was the default installation location, it also become the location of gems which are part of StdLib.And this is very unfortunate situation. In older days, without bundled and default gems, Fedora was using this operating_system.rb to configure where to install system wide available gems. Unfortunately, with the evolution as I described above and introduction of bundled/default gems, changing
Gem.default_dir
configuration also meant that there were suddenly missing the default/bundled gems. So Fedora adapted and this is the current version of operating_system.rb. It uses standard command line options, but these unfortunately has different side effects.Now back to the context of #5327, can we make sure that:
Maybe the first good step could be to free the StdLib gems from the
Gem.default_dir
and give theGem.default_dir
the old meaning, which was just the default install location. Nothing more nothing less.The text was updated successfully, but these errors were encountered: