首页 > 解决方案 > 升级 jruby 和 ruby​​mine 版本后无法安装 bundler/gems (SSLError)

问题描述

所以最近我遇到了一些 SSL 证书问题,所以为了帮助解决这个问题,我已经将我们的 jruby 1.7.4 升级到 jruby 9.1.15 和我们的 RubyMine 到 2018.2.1(使用 Ruby Cucumber 的团队)。

但是,现在我们在升级后安装/更新 gems 和 bundler 时遇到了问题。

我们正在尝试从命令提示符安装:

$ set HTTP_PROXY=https://username:password@proxyurl.net:port

$ gem install bundler

并收到错误:

错误:执行 gem 时...(OpenSSL::SSL::SSLError)

收到致命警报:protocol_version

在设置代理之前,错误是:

警告:无法从“ https://rubygems.org/ ”中提取数据:SocketError:无法打开到 ruby​​gems.org:443 的 TCP 连接(初始化:名称或服务未知)(https://rubygems.org/specs .4.8.gz )

已安装 1 个宝石

我什至尝试去星巴克完全避免代理,但仍然遇到类似的错误。

只是添加尝试在 RubyMine 中安装捆绑程序本身是行不通的。

标签: rubyssl

解决方案


So somehow I fixed it.. I'm not able to reproduce the fix but that might be related to some foundation problems the fix caused.

Basic steps I used (any of these might help):

Removed versions from gemfile

Trying to install bundler from outside proxy

Install bundler through command prompt and install gems through RubyMine

Change gemfile source to 'http' instead of 'https'

Will update more if I find how to reproduce fix


推荐阅读