Ruby installation is missing Psych. Ruby yaml extension not compiled #2012
-
My setup:
gem env
When I run
The Psych gem is installed for ruby 2.5.3:
What is wrong? How do I fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 19 comments 17 replies
-
Your pysch extension(~/gems/gems/psych-3.0.3/lib/psych.bundle) was built by 2.5.x. |
Beta Was this translation helpful? Give feedback.
-
@hsbt thanks, by uninstalling psych, rbenv installed ruby 2.6.0-preview3 without errors:
|
Beta Was this translation helpful? Give feedback.
-
Same problem here.
OS : Any idea how to debug that ? |
Beta Was this translation helpful? Give feedback.
-
@taliesinpenbardd so you can not run |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
@taliesinpenbardd FWIW you can choose to store your gems in your home directory, by adding the following to your shell config file:
|
Beta Was this translation helpful? Give feedback.
-
@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. 😄 ) |
Beta Was this translation helpful? Give feedback.
-
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). |
Beta Was this translation helpful? Give feedback.
-
Running |
Beta Was this translation helpful? Give feedback.
-
I get this when trying to uninstall |
Beta Was this translation helpful? Give feedback.
-
I'm trapped by this as well. ASDF seems to have the same problem |
Beta Was this translation helpful? Give feedback.
-
I was setting up a clean machine on MacOS Ventura 13.0 and ran into this issue. |
Beta Was this translation helpful? Give feedback.
-
Got this issue on Ubuntu 22.04 while installing Ruby 3.2.0 as well. Fixed by installing sudo apt install libyaml-dev |
Beta Was this translation helpful? Give feedback.
-
I get this no matter which version of Ruby I try to install using debian. Here is the log https://gist.github.com/rafaelfranca/91250c4079cb483c9cc6796c6356cd82 |
Beta Was this translation helpful? Give feedback.
-
Make sure your environment meets the requirements as suggested in the wiki. Then, depending on your system, pass the libyaml path to the installation process. For me, on an M2 Ventura 13.2.1, with a Homebrew-installed ~ % brew reinstall libyaml
~ % gem install psych -- --with-libyaml-dir=$(brew --prefix libyaml)
~ % export RUBY_CONFIGURE_OPTS=--with-libyaml-dir=$(brew --prefix libyaml)
~ % asdf install ruby latest |
Beta Was this translation helpful? Give feedback.
-
@mislav Any ideas why/what could cause the error?
Full log attached - 1.log Seemingly it happened already after the Ruby 2.7.7 was successfully installed. Having checked the installation I don't see any issues with YAML/Psych & smoke test code below runs perfectly. 🤷♂️
|
Beta Was this translation helpful? Give feedback.
-
My solution: I use Rocky Linux 8 ( forked from centos) and I tried to install ruby 3.2.2 using:
So, I got this message:
How I resolved it: as root, I installed libyaml + libyaml-devel:
But you have to enable powertools repo to install source version libyaml-devel:
After installing both, at my root prompt I typed;
Finally, I logged in as normal user and installed ruby version 3.2.2:
It worked for me. |
Beta Was this translation helpful? Give feedback.
-
For Mac M1 with Monterey I could install Ruby 2.3.1 and 3.2.1 with Rosetta following these tutorials: |
Beta Was this translation helpful? Give feedback.
-
Oof, this was frustrating. A simple 3.1.2 to 3.2.1 Ruby upgrade on CentOS Stream 9 turned into an hours-long event because of this issue. Key thing ended up being enabling dnf config-manager --set-enabled crb
yum install -y libyaml-devel I think the above should do it, but if not, here's everything that I did:
|
Beta Was this translation helpful? Give feedback.
Make sure your environment meets the requirements as suggested in the wiki. Then, depending on your system, pass the libyaml path to the installation process.
For me, on an M2 Ventura 13.2.1, with a Homebrew-installed
asdf
(ruby-build under the hood):