“gem install rails” fails with DNS error

后端 未结 14 734
我在风中等你
我在风中等你 2020-12-01 07:59
$ rvm use
Using /home/owner/.rvm/gems/ruby-2.1.2
$ gem install rails
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ECONNREFUSED: Connec         


        
14条回答
  •  甜味超标
    2020-12-01 08:42

    For me "your-dns-needs-immediate-attention", actually meant "your gem sources are not valid".

    gem source --list
    

    Check the output. If the current list isn't valid, then you can simply

    gem source -a https://rubygems.org
    

    ...or whatever other sources are appropriate. Then use the -r flag to remove the invalid sources.

提交回复
热议问题