Error installing Bundler

后端 未结 13 956
感情败类
感情败类 2020-12-05 07:17

I am trying to install the Bundler gem on my Mac. With the command: sudo gem install bundler I get the following error:

ERROR:  Could not find a         


        
13条回答
  •  失恋的感觉
    2020-12-05 07:45

    for those Chinese users:

    $ gem install bundler
    ERROR:  Could not find a valid gem 'bundler' (>= 0), here is why:
              Unable to download data from https://rubygems.org/ - Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/latest_specs.4.8.gz)
    
    $ gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
    
    $ gem sources  -l
    *** CURRENT SOURCES ***
    
    https://ruby.taobao.org/
    
    $ gem install bundler 
    
    Fetching: bundler-1.12.5.gem (100%)
    Successfully installed bundler-1.12.5
    Parsing documentation for bundler-1.12.5
    Installing ri documentation for bundler-1.12.5
    Done installing documentation for bundler after 4 seconds
    1 gem installed
    

    My environment: rbenv, ruby 2.1.2, ubuntu 16.04 LTS

提交回复
热议问题