>>> Compiling source in /tmp/portage/media-video/mkvtoolnix-8.8.0/work/mkvtoolnix-8.8.0 ... /usr/lib64/ruby/2.2.0/rubygems.rb:16:in `require': cannot load such file -- rubygems/compat ibility (LoadError) from /usr/lib64/ruby/2.2.0/rubygems.rb:16:in `<top (required)>' from <internal:gem_prelude>:1:in `require' from <internal:gem_prelude>:1:in `<compiled>' Long story short, it attempts to use ruby:2.2 which I had installed for some reason but which isn't in my RUBY_TARGETS, and which doesn't therefore have rubygems installed.
Feel free to figure out how to use the ruby eclasses to properly do this in order to remove the current hack. It involved rewriting them the last time I looked. :)
This would be helped with bug 444828
I don't think this is relevant anymore for mkvtoolnix since rake now supports parallel jobs and is used instead of the bundled drake.