修复“红宝石安装缺少心理".错误? [英] Fixing the "ruby installation is missing psych" error?

查看:131
本文介绍了修复“红宝石安装缺少心理".错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Ruby ruby​​ 1.9.3p125,并且不断收到此错误,这使我无法在Rails中进行任何类型的开发.

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.

似乎您的ruby安装缺少心理功能(用于YAML输出).到 消除此警告,请安装libyaml并重新安装 红宝石.

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

我已经在Google周围搜索了,并且似乎尝试了所有方法,但似乎没有任何效果.我真的很想开始一些新项目,但似乎无法克服这个障碍.

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.

任何帮助将不胜感激!

推荐答案

用rvm安装ruby 1.9.3之后,我遇到了同样的问题. 我通过将 yaml-0.1.4.tar.gz 下载到〜/.rvm/archives中,然后再次重新安装ruby来解决该问题.

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

这篇关于修复“红宝石安装缺少心理".错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆