how to solve "ruby installation is missing psych" error?

Pouya picture Pouya · Feb 24, 2012 · Viewed 93.2k times · Source

I used rvm to install ruby 1.9.3. even though it was successfully installed, it complained about libyaml. and now every time i wanna install a gem (say rails) this warning shows up:

It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby.

I use Mac os X 10.7 (Lion).

Answer

peterpengnz picture peterpengnz · Mar 1, 2012

In my case

rvm pkg install libyaml

and

rvm reinstall ruby-1.9.3-p125

solved the problem.

For people using Ubuntu, make sure that libtool is installed prior to the steps above:

sudo apt-get install libtool

For macOS users (with homebrew):

rm -rf /usr/local/lib/ruby/gems/ && brew reinstall ruby