Repository navigation
Closed
Description
My setup:
- macOS Mojave with ruby 2.3.7 as the default ruby (/usr/bin/ruby)
brew install rubyinstall 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
Labels
No labels
Activity
[-]Ruby installation is miissing Psych, Ruby yaml extension not compiled[/-][+]Ruby installation is missing Psych. Ruby yaml extension not compiled[/+]hsbt commentedon Nov 8, 2018
Your pysch extension(~/gems/gems/psych-3.0.3/lib/psych.bundle) was built by 2.5.x.
DirtyF commentedon Nov 8, 2018
@hsbt thanks, by uninstalling psych, rbenv installed ruby 2.6.0-preview3 without errors:
Installed ruby-2.6.0-preview3 to /Users/frank/.rbenv/versions/2.6.0-preview3taliesinpenbardd commentedon Dec 12, 2018
Same problem here.
gemcommand won't respond to anything :ruby -v:ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]OS :
Mac OS X Mojave 10.14.1
Any idea how to debug that ?
DirtyF commentedon Dec 12, 2018
@taliesinpenbardd so you can not run
gem unsinstall psych? Maybe try to remove/Users/username/.rvm/gems/ruby-2.5.1/gems/psych-3.0.3/manually?taliesinpenbardd commentedon Dec 12, 2018
@DirtyF I've finally uninstalled RVM, and tried my luck with RBENV. No luck so far, I still can't use the gems I've installed (and reinstalled). I suppose it's a wrong installation location on the system, or perhaps a permissions problem. Still looking, but I guess it's out of the focus of this ticket.
Thanks anyway.
DirtyF commentedon Dec 12, 2018
@taliesinpenbardd FWIW you can choose to store your gems in your home directory, by adding the following to your shell config file:
taliesinpenbardd commentedon Dec 13, 2018
@DirtyF Thank you very much, it seems to work. (and thank you also, I did discover Jekyll and am gonna use it sometime in the future. 😄 )
farisarie commentedon Apr 27, 2022
i have a problem when i trying to installing feedkit library and this warning showup I didn't find any solution, do u know what I should do?
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/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.
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/psych-4.0.2/lib/psych.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/psych-4.0.2/lib/psych.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/psych.bundle' (no such file) - /Library/Ruby/Gems/2.6.0/gems/psych-4.0.2/lib/psych.bundle (LoadError)
eertmanhidde commentedon May 5, 2022
Running
gem uninstall psychfrom my older ruby version(2.7.2) fixed the issue for measkdesigners commentedon Jul 15, 2022
I get this when trying to uninstall
Gem psych-4.0.3 cannot be uninstalled because it is a default gem