cov*_*ard 34 ruby macos openssl rvm
使用rvm我将我的ruby升级到1.9.3-p392,也添加了2.0.0,我运行bundle命令时尝试使用这个版本时我得到了这个错误.
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.
Run Code Online (Sandbox Code Playgroud)
我已经按照几个不同的说明来解决这个问题.我试过删除版本并使用rvm选项安装它
--with-openssl-dir=$HOME/.rvm/usr
Run Code Online (Sandbox Code Playgroud)
我用rvm和macports安装了OpenSSL.两者都没有帮助解决问题.我甚至使用以下方法更改了ssl证书的文件位置:
export SSL_CERT_FILE=/Users/DarkLord/.rvm/usr/ssl/cert.pem
Run Code Online (Sandbox Code Playgroud)
无论我做什么,我都会继续得到错误.有人可以帮我解决这个问题吗?
小智 51
这对我有用:
rvm get stable
brew install libyaml
rvm pkg install openssl
rvm install ruby-2.0.0 --with-openssl-dir=$HOME/.rvm/usr
rvm use ruby-2.0.0
所有学分都转到https://coderwall.com/p/tptocq
小智 43
这有助于我在Mac上安装1.9.3-head:
rvm get latest
brew install openssl
rvm reinstall 1.9.3-head --with-openssl-dir=`brew --prefix openssl`
Run Code Online (Sandbox Code Playgroud)
为了让这个工作再次起作用,我不得不安装自制软件并将我的mac端口移开.删除1.9.3-p392和2.0.0-p0后执行以下操作:
rvm get head --autolibs=3
rvm install 1.9.3 --with-opt-dir=/usr/bin
rvm install 2.0.0
Run Code Online (Sandbox Code Playgroud)
有些东西不适用于我的mac端口和openssl以及make和configure.这是我能够让rvm再次安装ruby而不会遇到openssl问题或make/configure问题的唯一方法.
小智 7
就我而言:
1. brew install openssl
2. rvm install ruby-2.6.0
Run Code Online (Sandbox Code Playgroud)
bundle install因此错误而失败。问题是,openssl是全局设置的,因此我必须通过显式设置openssl目录来安装新的ruby版本。
所以我要做的是:
1. rvm reinstall ruby-2.6.0 --with-openssl-dir=/usr/local/opt/openssl
2. rvm reload
Run Code Online (Sandbox Code Playgroud)
假设这usr/local/opt/openssl是它的安装位置。
之后bundle install成功运行。
当我尝试使用此路径尝试此命令时发出警告,/usr/local如建议的一些答案,此命令不起作用。
小智 6
就我而言:
问题:安装ruby-2.3.1后,我运行命令bundle install,然后出现错误。
解决方案:
$ brew install openssl然后,使用 openssl 重新安装我需要的 ruby 版本(2.3.1)。
$ rvm reinstall 2.3.1 --with-openssl-dir=/usr/local/opt/openssl
这解决了我的问题!
小智 5
根据以下问题: 如何判断 RVM-installed ruby 实际上正在使用哪个 openssl lib
从 Ruby 1.9.3 开始,这些选项似乎--with-openssl-dir=...不再有效。我试过
rvm install 1.9.3 --with-opt-dir=/usr/local --with-openssl
Run Code Online (Sandbox Code Playgroud)
它起作用了。
根据上面@Purplejacket 的评论,新的方法如下:
rvm autolibs homebrew
rvm install 2.1.1
rvm use 2.1.1
Run Code Online (Sandbox Code Playgroud)
这要容易得多。
| 归档时间: |
|
| 查看次数: |
23506 次 |
| 最近记录: |