Homebrew-core: ruby 2.4.1_1 complains about missing libyaml

Created on 27 Mar 2017  路  4Comments  路  Source: Homebrew/homebrew-core

Hi,

after the upgrade to ruby 2.4.1_1, ruby it's complaining about missing libyaml that is correctly installed:

brew info libyaml
libyaml: stable 0.1.7 (bottled)
YAML Parser
http://pyyaml.org/wiki/LibYAML
/usr/local/Cellar/libyaml/0.1.7 (8 files, 312.6KB) *
  Poured from bottle on 2017-03-27 at 08:09:56
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/libyaml.rb

The error message is the following:

gem update
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/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/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle, 9): Library not loaded: /usr/local/opt/ruby/lib/libruby.2.4.0.dylib (LoadError)
  Referenced from: /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle
  Reason: image not found - /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.rb:8:in `<top (required)>'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/yaml.rb:6:in `<top (required)>'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems.rb:700:in `load_yaml'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/config_file.rb:340:in `load_file'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/config_file.rb:202:in `initialize'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/gem_runner.rb:75:in `new'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/gem_runner.rb:75:in `do_configuration'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/gem_runner.rb:40:in `run'
    from /usr/local/bin/gem:21:in `<main>'

Most helpful comment

Please check #11636.

All 4 comments

You need to reinstall that gem. Its linkage should be

iMac-TMP:~ joe$ otool -L  /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle 
/usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle:
    /usr/local/opt/ruby/lib/libruby.2.4.1.dylib (compatibility version 2.4.0, current version 2.4.1)
    /usr/local/opt/libyaml/lib/libyaml-0.2.dylib (compatibility version 3.0.0, current version 3.5.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
    /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

Hi ilovezfs,

it seems anyway that gem is broken after this update:

gem --version
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/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/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle, 9): Library not loaded: /usr/local/opt/ruby/lib/libruby.2.4.0.dylib (LoadError)
  Referenced from: /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle
  Reason: image not found - /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.rb:8:in `<top (required)>'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/yaml.rb:6:in `<top (required)>'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems.rb:700:in `load_yaml'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/config_file.rb:340:in `load_file'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/config_file.rb:202:in `initialize'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/gem_runner.rb:75:in `new'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/gem_runner.rb:75:in `do_configuration'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/gem_runner.rb:40:in `run'
    from /usr/local/bin/gem:21:in `<main>'

Please check #11636.

@dorapen Thanks. It worked

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dredmorbius picture dredmorbius  路  3Comments

BluePawDev picture BluePawDev  路  3Comments

tejasmanohar picture tejasmanohar  路  3Comments

bantl23 picture bantl23  路  3Comments

tglawless picture tglawless  路  3Comments