Ruby和“您必须使用OpenSSL支持重新编译Ruby或更改Gemfile中的源" [英] Ruby and "You must recompile Ruby with OpenSSL support or change the sources in your Gemfile"

查看:223
本文介绍了Ruby和“您必须使用OpenSSL支持重新编译Ruby或更改Gemfile中的源"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用rvm,我将红宝石升级到1.9.3-p392,也添加了2.0.0,每次在运行bundle命令时尝试使用此版本时,都会出现此错误.

Using rvm I upgraded my ruby to 1.9.3-p392, also added 2.0.0, anytime I try to use this version when I run my bundle command I get this error.

Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using RVM are
available at rvm.io/packages/openssl.

关于如何解决此问题,我遵循了一些不同的说明.我尝试删除该版本并使用rvm选项安装它

I have followed several different instructions on how to fix this. I have tried removing the version and installing it with the rvm options

--with-openssl-dir=$HOME/.rvm/usr

我已经用rvm和macports安装了OpenSSL.两者都没有帮助问题.我什至使用以下命令更改了ssl证书的文件位置:

I have installed OpenSSL with rvm, and macports. Both have not helped the problem. I even changed the file location of the ssl cert using this:

export SSL_CERT_FILE=/Users/DarkLord/.rvm/usr/ssl/cert.pem

无论我做什么,我都会继续收到错误消息. 有人可以帮我解决这个问题吗?

No matter what I do I continue to get the error. Can someone please help me fix this?

推荐答案

根据上述@Purplejacket的评论,新的实现方法如下:

The new way to do it, according to a comment by @Purplejacket above, is the following:

rvm autolibs homebrew
rvm install 2.1.1
rvm use 2.1.1

要容易得多.

这篇关于Ruby和“您必须使用OpenSSL支持重新编译Ruby或更改Gemfile中的源"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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