Question

I'm running Ruby ruby 1.9.3p125 and I keep getting this error which is making it impossible for me to do any kind of development in Rails.

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

I've Googled around and tried seemingly everything but nothing seems to be working. I'm really eager to start on some new projects but can't seem to get around this hurdle.

Any help is greatly appreciated!

Was it helpful?

Solution

I had same problem after installing ruby 1.9.3 with rvm. I solve it by downloading yaml-0.1.4.tar.gz into ~/.rvm/archives and then reinstalled ruby again.

cd ~/.rvm/archives
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
rvm reinstall 1.9.3 

If you get some compileerrors, try with this instead

rvm reinstall 1.9.3 --with-gcc=clang

OTHER TIPS

for ubuntu 64 bit nothing was working, but finally when I installed

libyaml-dev using

sudo apt-get install libyaml-dev

everything worked even with reinstalling ruby

The error message is a little confusing.

For Ubuntu Linux try installing

sudo apt-get install libyaml-dev

Or for openSuSE Linux run

sudo zypper install libyaml-devel

then re-compile & re-install Ruby and you should be good to go.

A couple of points, though -- run make clean to remove old compiled files. Then run sudo make install to ensure you have proper permissions for system level installs. Finally, you might get some "file 'lib' not found" errors... ignore these. Rails seems to work just fine.

You need libyaml to be present at the time that Ruby 1.9.3 is built. See my answer here, describing the process (without rvm):

https://stackoverflow.com/a/12361446/341994

Simple solution to this for me was brew install libyaml. In my case I got the message:

Warning: libyaml-0.1.6_1 already installed, it's just not linked

So, brew link libyaml produced

Linking /usr/local/Cellar/libyaml/0.1.6_1... 5 symlinks created

Done. This assumes you have homebrew, which you should. If you don't, install it thusly:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

...and then start at the top here. Cheers!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top