rubyinstallationvps

Unable to resolve Ruby error (missing psych)


Whenever I run something with Ruby on my server, I get the following error:

/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.

I installed Ruby using RVM onto my VPS.

I’ve tried installing the package libyaml as per instructed in other issues on Stack Overflow, to no avail.

I’m not sure what type of system my VPS is running, but it doesn’t have the apt-get command. It does have yum


Solution

  • I had this problem and installing libyaml didn't help. It turned out that libyaml-devel was needed by psych. I was on centos6 so I did this:

    curl -O http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/atomic-release-1.0-14.el6.art.noarch.rpm
    
    sudo  rpm -Uvh atomic-release-1.0-14.el6.art.noarch.rpm
    
    sudo yum install libyaml-devel
    
    rvm reinstall 1.9.3-p194