美文网首页
Mac下搭建ruby遇到openssl问题

Mac下搭建ruby遇到openssl问题

作者: sansanl | 来源:发表于2017-02-16 10:03 被阅读0次

最近刚接手了一台新MacBook pro 在搭建cocoapod中。设置ruby源的时候遇到了如下问题:

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

提示很明显是OpenSSL的问题,所以所有https请求都无法执行,在设置淘宝源的时候也报这个错误。

以下讲的是基于RVM已经安装好ruby

首先安装一下openssl

1.rvm pkg install openssl

2.rvm install 2.3.0 --with-openssl-dir=/Users/milai/.rvm/usr   (加粗的代表 第一步安装openssl的文件目录)

然后就可以正常添加淘宝源了~

相关文章

网友评论

      本文标题:Mac下搭建ruby遇到openssl问题

      本文链接:https://www.haomeiwen.com/subject/wfbcwttx.html