无法解决Ruby错误(缺少psych)

前端之家收集整理的这篇文章主要介绍了无法解决Ruby错误(缺少psych)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
每当我在我的服务器上运行 Ruby的东西时,我会收到以下错误
  1. /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
  2. It seems your ruby installation is missing psych (for YAML output).
  3. To eliminate this warning,please install libyaml and reinstall your ruby.

我使用RVM将Ruby安装到我的VPS上.

我已经尝试按照Stack Overflow中的其他问题安装libyaml包,无效.

我不知道我的VPS正在运行什么类型的系统,但没有apt-get命令.它有yum …

解决方法

我有这个问题,并安装libyaml没有帮助.原来,psych需要libyaml-devel.我在centos6,所以我这样做:
  1. curl -O http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/atomic-release-1.0-14.el6.art.noarch.rpm
  2.  
  3. sudo rpm -Uvh atomic-release-1.0-14.el6.art.noarch.rpm
  4.  
  5. sudo yum install libyaml-devel
  6.  
  7. rvm reinstall 1.9.3-p194

猜你在找的Ruby相关文章