There would be a few minor logic issues around gem looking for --install-dir + --user-directory and erroring out... that check would need to be changed to --no-user-directory + --install-dir
This definitely would need some discussion as it has a moderate scope (which tools using gem expect system-wide installation?)
To keep compatibility in logic, gem might need to detect the root/administrator user and install system-wide by default to ensure when someone sudo gem install XXX the gem isn't just installed for the root user.
yeah, the large number of workarounds show this is a pretty default workflow for people. Thus raises the question on why it isn't the default behavior.
Issue #11731 has been updated by Alexander von Gluck.
yeah, the large number of workarounds show this is a pretty default
workflow for people. Thus raises the question on why it isn't the default
behavior.
Opinion, not fact: is it not the case that most folk who develop
independently usually do so where they either a) use rbenv or b) own the
machine and can sudo safely? And by contrast, the people who can't do
that are usually in corporate environments where site-wide installation
makes most sense?
Note that rbenv isn't just a workaround for this, it also allows
independent installation of entire Ruby environments, including
core/stdlib, parser, etc. So I don't know that we can say that there's
necessarily a large number of workarounds just for local gems.