“无法要求openssl"尝试在OS X上安装ruby gems时 [英] "Unable to require openssl" when trying to install ruby gems on OS X

查看:96
本文介绍了“无法要求openssl"尝试在OS X上安装ruby gems时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我升级到OS X 10.10 Yosemite以来,尝试安装红宝石gem时出现以下错误:

Since I upgraded to OS X 10.10 Yosemite, I get the following error when trying to install a ruby gem:

ERROR:  While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources

但是当我执行which openssl时,它会向我显示路径:

But when I do which openssl it shows me the path:

/usr/local/bin/openssl

我已经卸载并重新安装了rvm和ruby,但仍然遇到相同的错误.

I have uninstalled and reinstalled rvm and ruby but still get the same error.

如何安装Ruby gem?

How do I install Ruby gems?

推荐答案

优胜美地上Ruby的OpenSSL问题可能是由于您安装的Ruby版本试图在/etc/openssl/certs中找到OpenSSL证书而不是在.尝试使用--disable-binary开关重新安装红宝石,以便在本地计算机上重建源,而不是使用预编译的二进制文件.例如:

OpenSSL issues with Ruby on Yosemite could be a result of your installed version of Ruby trying to locate OpenSSL certificates in /etc/openssl/certs instead of its new location at /usr/local/etc/openssl/certs. Try reinstalling ruby using the --disable-binary switch so that the source is re-built on your local machine instead of using the pre-compiled binary. For example:

rvm uninstall 2.2.0
rvm install 2.2.0 --disable-binary

这篇关于“无法要求openssl"尝试在OS X上安装ruby gems时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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