Bug 2000054

Summary: rh-ruby30 ruby: User-installed rubygems plugins are not being loaded
Product: Red Hat Software Collections Reporter: Jarek Prokop <jprokop>
Component: rubyAssignee: Jarek Prokop <jprokop>
Status: CLOSED WONTFIX QA Contact: Lukáš Zachar <lzachar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rh-ruby30Keywords: Triaged, ZStream
Target Milestone: alpha   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2128629 (view as bug list) Environment:
Last Closed: 2022-10-07 12:57:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2117525    
Bug Blocks: 2128629    

Description Jarek Prokop 2021-09-01 09:41:08 UTC
Description of problem:
User-installed rubygems plugins are not being loaded correctly.

Version-Release number of selected component (if applicable):
ruby-3.0.{0,1,2}

How reproducible:
Always

Steps to Reproduce:
1. gem install geminabox --user-install
2. gem inabox --help

Actual results:
~~~
$ gem inabox --help
ERROR:  While executing gem ... (Gem::CommandLineError)
    Unknown command inabox
~~~

Expected results:
~~~
$ gem inabox --help
Usage: gem inabox GEM [options]

  Options:
    -c, --configure                  Configure GemInABox
    -g, --host HOST                  Host to upload to.
    -o, --overwrite                  Overwrite Gem.
    -p, --port                       Sets port


  Common Options:
    -h, --help                       Get help on this command
    -V, --[no-]verbose               Set the verbose level of output
    -q, --quiet                      Silence command progress meter
        --silent                     Silence RubyGems output
        --config-file FILE           Use this config file instead of default
        --backtrace                  Show stack backtrace on errors
        --debug                      Turn on Ruby debugging
        --norc                       Avoid loading any .gemrc file


  Arguments:
    GEM       built gem to push up

  Summary:
    Push a gem up to your GemInABox

  Description:
    Push a gem up to your GemInABox
~~~

Additional info:
A possible workaround is pre-loading the gem, like so
`$ RUBYOPT=-r<gem> gem <command>`
Or specifying $GEM_HOME:
`$ GEM_HOME=/builddir/.local/share/gem/ruby/3.0.0 gem <command>`

The issue was fixed upstream: https://github.com/rubygems/rubygems/pull/4829