1

首先是我在防火墙后面,所以我不能使用https://rubygems.org/

 $ bundle install rails
bundle install requires at least 0 argument: "bundle install".
git@gitdev  $ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.0.4) 

Gem::RemoteFetcher::FetchError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A (https://s3.amazonaws.com/production.s3.rubygems.org/gems/i18n-0.6.1.gem)
An error occurred while installing i18n (0.6.1), and Bundler cannot continue.
Make sure that `gem install i18n -v '0.6.1'` succeeds before bundling.

我认为bundler使用rubygems,所以我查看了rubygems来源:

$ gem source
*** CURRENT SOURCES ***
http://rubygems.org/

之前https://rubygems.org

此设置使用RVM. 使用全局 ruby​​ 安装时,通过更改gem源,我能够安装 rails。所有 ssl 连接都被防火墙阻止,尤其是 github 和 aws。非 ssl 链接在我的环境中有效。

所以问题是为什么bundler没有看到它gems有一个非 SSL 的来源?

4

1 回答 1

3

检查你的 Gemfile,它必须有一行指定捆绑器使用的源:

source 'https://rubygems.org'

这是捆绑器使用的默认源。

于 2013-06-11T12:41:12.927 回答