Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

for ubuntu and rvm

sudo apt-get install libtool
rvm pkg install libyaml
rvm reinstall 1.9.3

worked


brew install libyaml
rvm reinstall 1.9.3

Is what worked for me (on Snow Leopard).


If not using rvm, but rather you are building and installing ruby 1.9.3 from scratch — for example, you're managing your ruby versions with rbenv — you must install libyaml first. Get it from http://pyyaml.org/; at the moment, the file you want is http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz. Open the tarball and cd into the resulting folder. Then:

./configure --prefix=/usr/local
make
sudo make install

You are now ready to build ruby. Download ruby from http://ftp.ruby-lang.org/pub/ruby/. Open the tarball and cd into the resulting folder. Now:

./configure --prefix=/wherever/you/want/it/to/go
make
make install

(Or possibly sudo make install, depending on where you're putting it.) If using rbenv, you'll know it has worked if you switch to rbenv global 1.9.3-p194 (or whatever your version is called) and gem --version works without a warning. That worked for me on Mac OS X 10.6.8. (Update: I just tried this on Mac OS X 10.8.1 and it seems to have worked fine there too.)


In my case the solution was to add the psych gem to the Gemfile.


I had this problem. libyaml wouldn't compile. It turns out I was missing libtool.

yum install libtool
yum install libyaml (or rvm pkg install libyaml)
rvm reinstall 1.9.3

That solved my problem.