FS#70960 - [rubygems] better way to do --user-install with operating_system.rb

Attached to Project: Arch Linux
Opened by Felipe Contreras (felipec) - Thursday, 20 May 2021, 19:13 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:26 GMT
Task Type General Gripe
Category Packages: Extra
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Currently rubygems installs an /etc/gemrc file to do `gem: --user-install`.

This works, if task  FS#70959  is implemented we can use operating_system.rb instead:

def self.operating_system_defaults
{ 'gem' => '--user-install' }
end

That way we only need to add one file.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:26 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/rubygems/issues/4
Comment by Felipe Contreras (felipec) - Friday, 21 May 2021, 08:23 GMT
Please note that  FS#70961  contains the more correct operating_system.rb that calls remove_method in order to remove warnings with `ruby -w`. Fedora does the same.
Comment by Felipe Contreras (felipec) - Thursday, 27 May 2021, 14:30 GMT
RVM shows the following warning:

* WARNING: Found --user-install in /etc/gemrc, please remove it, as it will break rubygems in RVM.
If it is intended or a mistake export rvm_ignore_gemrc_issues=1 to avoid this warning.

Again... We need to consider removing /etc/gemrc.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.
Comment by Alexandre ZANNI (noraj) - Monday, 04 September 2023, 10:40 GMT
We should not taking RVM into account anyway, RVM manage rubies the wrong way anyway. Safe ruby version managers are rbenv or asdf-vm.

What's the interest of def self.operating_system_defaults over /etc/gemrc?
Comment by Felipe Contreras (felipec) - Tuesday, 05 September 2023, 16:35 GMT
You can decide not to take RVM into account, but it exists, and people use it.

Using defaults/operating_system.rb is better than /etc/gemrc, not just for RVM, but in general. That's how most distributions set their defaults, and that's the whole purpose of the file.

The main advantage of defaults/operating_system.rb for me is that if in the future somebody decides to actually take a look at all the issues concerning ruby gems, only one file will need to be changed: defaults/operating_system.rb.

I'll flip the question to you: why /etc/gemrc over defaults/operating_system.rb?

Loading...