Mailing List Archive

Ruby problems
Hello list,

Has anyone here succeeded in building a new system since the recent Ruby
language upgrade? I keep being thwarted by failure such as this typical one:

>>> Install dev-ruby/rake-13.0.3-r1 into /var/tmp/portage/dev-ruby/
rake-13.0.3-r1/image
* Running install phase for ruby26 ...
* Running install phase for ruby27 ...
Traceback (most recent call last):
3: from <internal:gem_prelude>:1:in `<internal:gem_prelude>'
2: from <internal:gem_prelude>:1:in `require'
1: from /usr/lib64/ruby/2.7.0/rubygems.rb:16:in `<top (required)>'
/usr/lib64/ruby/2.7.0/rubygems.rb:16:in `require': cannot load such file --
rubygems/compatibility (LoadError)
* ERROR: dev-ruby/rake-13.0.3-r1::gentoo failed (install phase):
* Unable to generate gemspec file.

Similar failures occur whatever profile I use (of the suitable ones), and no
matter whether I set amd64 or ~amd64 in make.conf.

It's possible that I had some unhelpful USE flags set, I suppose, but I did try
to minimise them.

In the end I went back to a month-old backup and updated that instead.

--
Regards,
Peter.
Re: Ruby problems [ In reply to ]
On 2021-04-20 15:40+0100 Peter Humphrey <peter@prh.myzen.co.uk> wrote:

> Hello list,
>
> Has anyone here succeeded in building a new system since the recent
> Ruby language upgrade? I keep being thwarted by failure such as this
> typical one:
>
> >>> Install dev-ruby/rake-13.0.3-r1 into /var/tmp/portage/dev-ruby/
> rake-13.0.3-r1/image
> * Running install phase for ruby26 ...
> * Running install phase for ruby27 ...
> Traceback (most recent call last):
> 3: from <internal:gem_prelude>:1:in `<internal:gem_prelude>'
> 2: from <internal:gem_prelude>:1:in `require'
> 1: from /usr/lib64/ruby/2.7.0/rubygems.rb:16:in `<top
> (required)>' /usr/lib64/ruby/2.7.0/rubygems.rb:16:in `require':
> cannot load such file -- rubygems/compatibility (LoadError)
> * ERROR: dev-ruby/rake-13.0.3-r1::gentoo failed (install phase):
> * Unable to generate gemspec file.
>
> Similar failures occur whatever profile I use (of the suitable ones),
> and no matter whether I set amd64 or ~amd64 in make.conf.
>
> It's possible that I had some unhelpful USE flags set, I suppose, but
> I did try to minimise them.
>
> In the end I went back to a month-old backup and updated that instead.
>

That looks like you need to select the new ruby version with eselect.
It doesn't figure out the right version automatically, like python.
See also:
<https://archives.gentoo.org/gentoo-user/message/e7203a5fe084ab6f35351a814de3f6db>.

--
Get my PGP key with `gpg --locate-keys tastytea@tastytea.de` or at
<https://tastytea.de/tastytea.asc>.
Re: Ruby problems [ In reply to ]
On Tuesday, 20 April 2021 15:56:29 BST tastytea wrote:

> That looks like you need to select the new ruby version with eselect.
> It doesn't figure out the right version automatically, like python.

I tried setting ruby_targets_ruby30 in package.use (and ruby26 and 27 at
different times). I also tried with no ruby targets specified. Shouldn't that
have been enough?

> See also:
> <https://archives.gentoo.org/gentoo-user/message/e7203a5fe084ab6f35351a814de
> 3f6db>.

Thanks. It's a pity that such important advice is hidden so effectively.

--
Regards,
Peter.