修复“ruby 安装缺少 psych"的问题.错误? [英] Fixing the "ruby installation is missing psych" error?

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

问题描述

我正在运行 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​​ 安装似乎缺少 psych(用于 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

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

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