如何避免 windows 中的 gem 更新错误?

How to avoid gem update error in windows?

显示以下错误

C:\Ruby21>gem update
Updating installed gems
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certif
icate verify failed (https://api.rubygems.org/specs.4.8.gz)

C:\Ruby21>

可能被 windows 防火墙阻止。

这里 the fix 解决您的问题。

我只需要跟随 these instructions

Installing using update packages (NEW)

Now that RubyGems 1.8.x, 2.0.x, and 2.2.x have been released, you can manually update to those versions.

First, download the proper version of RubyGems for your installation (e.g. if running version 1.8.28, download 1.8.30).

Note: To find the version of RubyGems you're using, run gem --version in the command line.

You can find download links at GitHub under Releases.

Now, locate rubygems-update-X.Y.Z.gem where X.Y.Z will be the matching version of RubyGems that you need to update:

  • Running 1.8.x: download 1.8.30
  • Running 2.0.x: donwload 2.0.15
  • Running 2.2.x: download 2.2.3

Please download the file in a directory that you can later point to (e.g. the root of your harddrive C:\)

Now, using your Command Prompt:

C:\>gem install --local

C:\rubygems-update-1.8.30.gem

C:\>update_rubygems --no-ri --no-rdoc

After this, gem --version should report the new update version.

You can now safely uninstall rubygems-update gem:

C:\>gem uninstall rubygems-update -x Removing update_rubygems Successfully uninstalled rubygems-update-2.2.3

按照这些说明进行操作后,我能够 运行 gem update --system 成功。

我不必实施 the following set of instructions

我想我是 运行ning gem 版本 2.4.4.