Feature #11731
closed
Make ruby gem install to user-install by default
Added by kallisti5 (Alexander von Gluck) almost 9 years ago.
Updated almost 9 years ago.
Description
Installing gem's system-wide doesn't make sense 99% of the time...
- Linux -- Need root access via sudo
- Windows -- Need administrator
- Max OS X -- Need root access via sudo
- Haiku -- /boot/system read-only
gem currently installs gems system-wide by default
Since the most common use-case is to install gems for your own
user, why doesn't gem --user-directory by default?
Tools like rvm already set this manually.
Making --user-directory default means package maintainers only
need to --no-user-directory while everyone else just gem install's
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.
Aren't most people using rvm or rbenv/bundler to address this need?
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.
On 23 November 2015 at 08:56, kallisti5@unixzen.com wrote:
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.
--
Matthew Kerwin
http://matthew.kerwin.net.au/
- Subject changed from Make ruby gem install to user-directory by default to Make ruby gem install to user-install by default
- Status changed from Open to Third Party's Issue
Rubygems upstream is https://github.com/rubygems/rubygems.
Maybe to fallback to user-install when no permission to the default place.
BTW, is ruby installed under /boot
filesystem, on Haiku?
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0Like0Like0