安装Bundler时出错 [英] Error installing Bundler

查看:238
本文介绍了安装Bundler时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的Mac上安装Bundler gem。使用命令:
sudo gem install bundler 出现以下错误:

 错误:无法找到有效的gem'bundler'(> = 0),原因如下:
无法从https://rubygems.org/下载数据 - SSL_connect returned = 1 errno = 0 state = SSLv3读取服务器证书B:证书验证失败(https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)

显然这似乎是服务器问题,但我该如何解决这个问题? gem update --system 目前是最新的。有没有其他的方式来获得Bundler?

解决方案

有同样的问题,一切都在这里描述: http://railsapps.github.io/openssl-certificate-verify-failed.html



tl; dr 最近的RVM版本,Ruby版本管理器,包含一个实用程序来诊断和解决由过期的证书文件引起的错误。有关说明和建议,请参阅安装Rails文章。 RVM网站介绍了如何安装RVM。



如果您安装了RVM,请尝试以下操作:

<$ p $ $ b $ rvm -v
#rvm 1.19.1(稳定)
$ rvm osx-ssl-certs状态全部
#证书...
$ rvm osx-ssl-certs更新所有
#更新证书...

这就是如果您使用RVM(您必须使用RVM版本1.19.1或更高版本),则需要解决此问题。


I am trying to install the Bundler gem on my Mac. With the command: sudo gem install bundler I get the following error:

ERROR:  Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)

It clearly seems to be a server issue, but how do I go about solving this? gem update --system is currently up-to-date. Is there an alternative way to get Bundler?

解决方案

Had the same issue and everything is described here: http://railsapps.github.io/openssl-certificate-verify-failed.html

tl;dr Recent versions of RVM, the Ruby Version Manager, include a utility to diagnose and resolve errors caused by outdated certificate files. See the article Installing Rails for instructions and advice. The RVM website explains how to install RVM.

If you’ve installed RVM, try this:

$ rvm -v
# rvm 1.19.1 (stable)
$ rvm osx-ssl-certs status all
# Certificates for...
$ rvm osx-ssl-certs update all
# Updating certificates...

That’s all that is needed to resolve the issue if you are using RVM (you must be using RVM version 1.19.1 or newer).

这篇关于安装Bundler时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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