Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 633760

Summary: dev-qt/qtwebkit-5.9.1 - /usr/lib64/ruby/2.1.0/rubygems.rb:15:in `require': cannot load such file -- rubygems/compatibility (LoadError)
Product: Gentoo Linux Reporter: Dennis Schridde <dschridde+gentoobugs>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Dennis Schridde 2017-10-08 12:59:07 UTC
Created attachment 498084 [details]
build.log

ruby /var/tmp/portage/dev-qt/qtwebkit-5.9.1/work/qtwebkit-opensource-src-5.9.1/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb llint/LowLevelInterpreter.asm LLIntDesiredOffsets.h
/usr/lib64/ruby/2.1.0/rubygems.rb:15:in `require': cannot load such file -- rubygems/compatibility (LoadError)
    from /usr/lib64/ruby/2.1.0/rubygems.rb:15:in `<top (required)>'
    from <internal:gem_prelude>:1:in `require'
    from <internal:gem_prelude>:1:in `<compiled>'
make[2]: *** [Makefile.LLIntOffsetsExtractor:753: LLIntDesiredOffsets.h] Error 1
Comment 1 Andreas Sturmlechner gentoo-dev 2017-10-08 13:12:16 UTC
You are working with an invalid ruby version, 2.1.0 is not in tree and should be cleaned from your system.
Comment 2 Preston Crow 2018-02-12 23:36:54 UTC
I just hit this exact same bug, only with ruby 2.4.0, so it's not just obsolete packages.  I think the problem is that the version of ruby it's hitting (2.4.0) is not enabled in dev-ruby/rubygems (only ruby25 is set).

The solution is to unmerge the obsolete version of Ruby.

The key observation is that the version number in the error message doesn't match a version where rubygems is enabled.

I suspect another solution would be to use 'eselect ruby list' to make sure that the latest version is selected (one that says "with Rubygems").  If you're just pulling in ruby packages for dependencies, you might not think to do that, so while you may have the current version, you might be using an old one.

The bug status should still be Resolved/Invalid, but the updated explanation will help anyone else who hits this.