Skip to content

Ruby installation is missing Psych. Ruby yaml extension not compiled #1251

@DirtyF

Description

@DirtyF

My setup:

  • macOS Mojave with ruby 2.3.7 as the default ruby (/usr/bin/ruby)
  • brew install ruby install ruby 2.5.3 (/usr/local/opt/ruby/bin/ruby)
  • gems are installed in ~/gems/
gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.7.8
  - RUBY VERSION: 2.5.3 (2018-10-18 patchlevel 105) [x86_64-darwin18]
  - INSTALLATION DIRECTORY: /Users/frank/gems
  - USER INSTALLATION DIRECTORY: /Users/frank/.gem/ruby/2.5.0
  - RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/frank/gems/bin
  - SPEC CACHE DIRECTORY: /Users/frank/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/2.5.3_1/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-18
  - GEM PATHS:
     - /Users/frank/gems
     - /Users/frank/.gem/ruby/2.5.0
     - /usr/local/lib/ruby/gems/2.5.0
     - /usr/local/Cellar/ruby/2.5.3_1/lib/ruby/gems/2.5.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-document"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/opt/llvm@4/bin
     - /Users/frank/.rbenv/shims
     - /Users/frank/.rbenv/bin
     - /Users/frank/gems/bin
     - /usr/local/opt/ruby/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - ~/bin
     - /Users/frank/.go/bin
     - /usr/local/opt/go/libexec/bin
     - /usr/local/opt/fzf/bin

When I run rbenv install 2.6.0-preview3 the following error occurs on macOS Mojave:

/Users/frank/.rbenv/versions/2.6.0-preview3/lib/ruby/2.6.0/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
The Ruby yaml extension was not compiled.
ERROR: Ruby install aborted due to missing extensions

The Psych gem is installed for ruby 2.5.3:

otool -L ~/gems/gems/psych-3.0.3/lib/psych.bundle
/Users/frank/gems/gems/psych-3.0.3/lib/psych.bundle:
	/usr/local/opt/ruby/lib/libruby.2.5.dylib (compatibility version 2.5.0, current version 2.5.3)
	/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 1252.200.5)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

What is wrong? How do I fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions