commit:     582706b9d94786d8d20f55949474640f325dd854
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  4 07:38:39 2025 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Wed Jun  4 08:47:29 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=582706b9

dev-ruby/rubygems: fix prepare phase with USE=test

The rake invocation was loading code from both the rubygems version to
be installed and the system rubygems version. This can lead to
inconsistencies and errors due to mismatched versions.

Setting RUBYLIB should address this but that does not work for some
reason. Use "ruby -I lib" instead.

Closes: https://bugs.gentoo.org/957027
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 dev-ruby/rubygems/rubygems-3.5.23.ebuild | 2 +-
 dev-ruby/rubygems/rubygems-3.6.9.ebuild  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-ruby/rubygems/rubygems-3.5.23.ebuild 
b/dev-ruby/rubygems/rubygems-3.5.23.ebuild
index ba7752fa6f69..aa8c3129b718 100644
--- a/dev-ruby/rubygems/rubygems-3.5.23.ebuild
+++ b/dev-ruby/rubygems/rubygems-3.5.23.ebuild
@@ -65,7 +65,7 @@ all_ruby_prepare() {
        # RUBYLIB to ensure that we consistently use the new code for
        # rubygems and the bundled bundler.
        if use test; then
-               RUBYLIB=lib rake update_manifest || die
+               ruby -I lib -S rake update_manifest || die
        fi
 }
 

diff --git a/dev-ruby/rubygems/rubygems-3.6.9.ebuild 
b/dev-ruby/rubygems/rubygems-3.6.9.ebuild
index 24d7ccbe6695..d73ab1ca7d01 100644
--- a/dev-ruby/rubygems/rubygems-3.6.9.ebuild
+++ b/dev-ruby/rubygems/rubygems-3.6.9.ebuild
@@ -64,7 +64,7 @@ all_ruby_prepare() {
        # RUBYLIB to ensure that we consistently use the new code for
        # rubygems and the bundled bundler.
        if use test; then
-               RUBYLIB=lib rake update_manifest || die
+               ruby -I lib -S rake update_manifest || die
        fi
 }
 

Reply via email to