View Issue Details

IDProjectCategoryView StatusLast Update
0017698SCLo[All Projects] generalpublic2020-08-30 20:42
ReporterVVD 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Platformx86_64OSCentOSOS Version7.8.2003
Summary0017698: rh-ruby26: define GEM_HOME in enable script
DescriptionDon't know correct way, but I use this workaround - added to file /opt/rh/rh-ruby26/enable line:
export GEM_HOME=/opt/rh/rh-ruby26/root/usr/local/share/gems

Detailed description "why I suggest this" is here: https://github.com/rubygems/rubygems/issues/3881

P.S. It's possible to find better way than suggested.
TagsNo tags attached.

Activities

VVD

VVD

2020-08-30 20:42

reporter   ~0037609

Probably this is the place cause incorrect behavior: https://git.centos.org/rpms/rh-ruby26-ruby/blob/c7/f/SOURCES/operating_system.rb#_164-171

This patch work for me:
--- /opt/rh/rh-ruby26/root/usr/share/rubygems/rubygems/defaults/operating_system.rb.orig
+++ /opt/rh/rh-ruby26/root/usr/share/rubygems/rubygems/defaults/operating_system.rb
@@ -163,10 +163,10 @@
 
     def default_dir
       prefix = scl_prefix
- if Gem.default_dirs.key?(:"#{prefix}system")
- Gem.default_dirs[:"#{prefix}system"][:gem_dir]
+ if Gem.default_dirs.key?(:"#{prefix}local")
+ Gem.default_dirs[:"#{prefix}local"][:gem_dir]
       else
- Gem.default_dirs[:"system"][:gem_dir]
+ Gem.default_dirs[:"local"][:gem_dir]
       end
     end
 
Thanks to David Rodríguez for this idea (https://github.com/rubygems/rubygems/issues/3881#issuecomment-683462777).

Issue History

Date Modified Username Field Change
2020-08-30 06:56 VVD New Issue
2020-08-30 20:42 VVD Note Added: 0037609