【问题标题】:Why bundler doesn't see customized gem source?为什么 bundler 看不到定制的 gem 源?
【发布时间】:2013-06-11 12:25:19
【问题描述】:

首先,我在防火墙后面,所以我不能使用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 源?

【问题讨论】:

  • 你的机器上有~/.gemrc吗?
  • 在下面回答,它在 Gemfile 中,这是我在更改 ruby​​gems 源之前生成的捆绑程序。

标签: ruby rubygems rvm bundler


【解决方案1】:

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

source 'https://rubygems.org'

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

【讨论】:

  • 哈哈,我真是太愚蠢了。感谢您弄清楚,我对 ruby​​ 没有太多经验,只是尝试安装 gitlab 应用程序。 :)
猜你喜欢
  • 2011-09-06
  • 1970-01-01
  • 1970-01-01
  • 2016-07-11
  • 2023-03-04
  • 1970-01-01
  • 2019-02-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多