You are not logged in.

#1 2015-01-07 11:47:38

blubbb
Member
Registered: 2013-09-26
Posts: 59

[solved]Ruby require failed

Since I the upgrade to ruby 2.2 I can't require any gems in my ruby scripts(gem is installed):

/usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- nokogiri (LoadError)

Uninstalling and reinstalling gem didn't work. To run my scripts I now need to downgrade ruby, whenever I want to use vim I need to upgrade again to 2.2, because it depends on ruby 2.2:

/usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- nokogiri (LoadError)

Any solution on this? hmm

Last edited by blubbb (2015-01-07 15:11:38)

Offline

#2 2015-01-07 14:22:10

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [solved]Ruby require failed

Ruby uses /usr/lib/ruby/gems/2.2.0/$VERSION for gems so every major update it requires gem reinstallation.

Uninstalling and reinstalling gem didn't work.

Hmmm, it should help. How do you install/reinstall gems? Make sure you have your gem sources in /usr/lib/ruby/gems/2.2.0/

Another option is to use binary rubygems repo that I maintain - Quarry. It supports ruby 2.2.

Last edited by anatolik (2015-01-07 16:02:06)


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#3 2015-01-07 15:11:08

blubbb
Member
Registered: 2013-09-26
Posts: 59

Re: [solved]Ruby require failed

anatolik wrote:

Ruby uses /usr/lib/ruby/gems/2.2.0/$VERSION for gems so every major update it requires gem reinstallation.

Uninstalling and reinstalling gem didn't work.

Hmmm, it should help. How to you install/reinstall gems? Make sure you have your gem sources in /usr/lib/ruby/gems/2.2.0/

Another option is to use binary rubygems repo that I maintain - Quarry. It supports ruby 2.2.


Consider it solved, I tried it again and it worked. Insanity here I come...


Is there a fast/easy way to do this for ALL gems at once?

Offline

#4 2015-01-07 16:07:31

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [solved]Ruby require failed

blubbb wrote:

Is there a fast/easy way to do this for ALL gems at once?

Collect ruby packages installed via AUR:

pacman -Qqm | grep ^ruby-

and install them via makepkg or any of the AUR helpers. After that /usr/lib/ruby/gems/2.1.0/ should be empty.

Another thing to check is output of https://aur.archlinux.org/packages/lostfiles/ script that shows files that do not come from arch packages (i.e. were installed via gem directly).


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

Board footer

Powered by FluxBB