Why bundler doesn't see customized gem source?

爱⌒轻易说出口 提交于 2020-01-16 04:12:30

问题


First of all the thing is that I'm behind firewall so I can't use 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.

I thought that bundler uses rubygems so I looked at rubygems sources:

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

before it was https://rubygems.org

This setup is using RVM. When using global ruby installation, by changing gem source, I was able to install rails. All ssl connection blocked by firewall especially github and aws. Non-ssl links works in my environment.

So question is why bundler doesn't see that gems has a non-ssl'ed source?


回答1:


Check you Gemfile, it must have a line specifying the source used by bundler:

source 'https://rubygems.org'

This is the default source used by bundler.



来源:https://stackoverflow.com/questions/17044038/why-bundler-doesnt-see-customized-gem-source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!