Ask Your Question

Unable to update Ruby gems after upgrading F25 to F26

asked 2017-07-13 00:26:52 -0500

updated 2017-07-16 20:43:33 -0500

I upgraded to Fedora 26 from Fedora 25 using dnf system-upgrade. I am unable to update Ruby gems post upgrade to Fedora 26. I get a build error from gem update stating that YAML support is not available. I have tried re-installing rubygem-psych and ruby to no avail. I have a feeling that it may be due to some old configuration files or old gem installs because I can (after installing a few depends) get gems to update on a clean Fedora 26 install, but I don't really want to do a clean install on this particular pc as there are configs and ssh keys and virtual machines and gpg keys and configured servers on it, some of which I don't really want to reconfigure from scratch, and some of which I don't have the spare storage capacity to back up at present...they're not 100% vital in that I absolutely can't live without them and the gpg keys aren't public so losing them doesn't bother me, but it would be nice not to have to do a clean rebuild just because ruby wasn't working. Does anyone know why ruby thinks the dependencies are missing (despite being installed) and how to get it to detect that the dependency is there?

edit - This is the error message I get when issuing a gem update:

~]$ gem update
/usr/share/ruby/yaml.rb:5:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:133:in `require': cannot open shared object file: No such file or directory - /usr/local/lib64/gems/ruby/psych-2.2.4/ (LoadError)
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:40:in `require'
        from /usr/local/share/gems/gems/psych-2.2.4/lib/psych.rb:8:in `<top (required)>'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/share/ruby/yaml.rb:6:in `<top (required)>'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/share/rubygems/rubygems.rb:700:in `load_yaml'
        from /usr/share/rubygems/rubygems/config_file.rb:340:in `load_file'
        from /usr/share/rubygems/rubygems/config_file.rb:202:in `initialize'
        from /usr/share/rubygems/rubygems/gem_runner.rb:75:in `new'
        from /usr/share/rubygems/rubygems/gem_runner.rb:75:in `do_configuration'
        from /usr/share/rubygems/rubygems/gem_runner.rb:40:in `run'
        from /usr/bin/gem:21:in `<main>'
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-16 20:36:12 -0500

Resolved this by running rm -rf /usr/local/lib64/gems/ruby/psych-2.2.4 and gem pristine psych --version 2.2.4 Thanks.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-07-13 00:26:52 -0500

Seen: 281 times

Last updated: Jul 16 '17