gem install bundle 安装失败

  1. 在进行安装bundle时,会出现以下的错误。
    # gem install bundle
    ERROR: Could not find a valid gem ‘bundle’ (>= 0), here is why:
    Unable to download data from https://rubygems.org/ - Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://rubygems.org/latest_specs.4.8.gz)ruby

  2. 这种状况,是被墙了。markdown

  3. 须要替换了,以下:
    # gem sources --remove https://rubygems.org/
    https://rubygems.org/ removed from sources
    # gem sources -a http://ruby.taobao.org/
    Error fetching http://ruby.taobao.org/:
    bad response Not Found 404 (http://ruby.taobao.org/specs.4.8.gz)
    # gem sources -a https://ruby.taobao.org/
    source https://ruby.taobao.org/ already present in the cache
    # gem sources -l
    CURRENT SOURCES
    https://ruby.taobao.org/
    # gem install bundle Fetching: bundler-1.10.6.gem (100%) Successfully installed bundler-1.10.6