gpt4 book ai didi

ruby-on-rails - 如何重新编译 Ruby 和 OpenSSL?

转载 作者:数据小太阳 更新时间:2023-10-29 08:03:11 30 4
gpt4 key购买 nike

我目前正在设置一台没有生产配置工具的服务器。服务器是 RHEL 6.5,我们使用的是 Ruby 2.1.4。服务器不通过 rbenvrvm 管理 Rubies。

问题是,当我尝试执行 bundle install 时,我遇到了这个 OpenSSL 问题。

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 http://rvm.io/packages/openssl.

Gemfile 中,我们使用我们自己的 gems 来源:source 'http://gems.ourhost.org/'

我想知道是否有人遇到过同样的问题。感谢您的帮助。

最佳答案

SSLv3 已在上游 OpenSSL 中被禁用,所以我不得不重新安装我的 ruby​​ 版本,这些版本没有针对此的补丁,补丁允许在禁用 SSLv3 的情况下运行。补丁是here .这是我所做的,使用 RVM(我知道你说过你不使用它,所以你可以从源代码安装 ruby​​ 但先修补它):

wget https://github.com/ruby/ruby/commit/801e1fe46d83c856844ba18ae4751478c59af0d1.diff -O openssl.patch
rvm reinstall --patch openssl.patch 2.2.3

关于 this github issue 有更多信息,以及报告使用不同版本取得成功的人。

关于ruby-on-rails - 如何重新编译 Ruby 和 OpenSSL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35544677/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com