You are not logged in.

#1 2019-02-01 20:52:33

anselm
Member
Registered: 2017-11-21
Posts: 37

Ruby 2.6 Rubygems error

After that I upgraded Ruby to version 2.6, I am unable to use it anymore. I always get this error message, even when I issue a simple "ruby --version" command:

Traceback (most recent call last):
	1: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
<internal:gem_prelude>:2:in `require': cannot load such file -- rubygems.rb (LoadError)

And I have to downgdare Ruby to the previous 2.5.x version, to make it work by:

sudo pacman -U https://archive.archlinux32.org/packages/r/ruby/ruby-2.5.3-1.0-i686.pkg.tar.xz

Then it works again.

Offline

#2 2019-02-01 21:07:15

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 254

Re: Ruby 2.6 Rubygems error

Can you check your 2.6 and see if it includes rubygems.rb somewhere.  Something like 'bdstar -tzf /var/cache/pacman/pkg/ruby-2.6*|grep rubygems.rb'

And see if you've got rubygems.rb in 2.5, or if this is a newly required inclusion.  You could do something similar for that, or look in your filesystems, but on my installs at least, filtering through everything in /usr is generally slower than listing a package.

Offline

#3 2019-02-02 07:16:41

deep42thought
Administrator
From: Jena, Germany
Registered: 2017-06-17
Posts: 383

Re: Ruby 2.6 Rubygems error

pacman -Qlp (or pacman -Ql) is the cleaner way to look at the included files: rubygems.rb is not included and was not included in ruby-2.5. Something else seems to be the problem, but I don't know (yet) what.

regards,
deep42thought

Offline

#4 2019-02-02 07:38:22

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 605
Website

Re: Ruby 2.6 Rubygems error

Maybe this is the problem:

ruby --version
ruby 2.6.0p0 (2018-12-25 revision 66547) [i686-linux]

pacman -Ql rubygems | grep rubygems.rb
rubygems /usr/lib/ruby/2.5.0/rubygems.rb

So, stable contains rubygems from the old version and the interpreter is on the new version.

Though I still get no such errors when doing

ruby --version

I pushed rubygems 3.0.2-3.1 (for 2.6) to stable, let's see, if this helps, or if we break more stuff. :-)

Offline

#5 2019-02-15 04:04:37

anselm
Member
Registered: 2017-11-21
Posts: 37

Re: Ruby 2.6 Rubygems error

Now it works, thanks. I had to install the "rubygems" package too, with

yay -Syy rubygems

Offline

Board footer

Powered by FluxBB