安装捆绑器时出错

安装捆绑器时出错

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

问题描述

我正在尝试在我的 Mac 上安装 Bundler gem.使用命令:sudo gem install bundler 我收到以下错误:

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)

这显然是服务器问题,但我该如何解决呢?gem update --system 当前是最新的.有没有其他获取 Bundler 的方法?

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?

推荐答案

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

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

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

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.

如果你已经安装了 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...

如果您使用的是 RVM(您必须使用 RVM 1.19.1 或更高版本),这就是解决问题所需的全部内容.

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).

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

07-23 12:03