“gem install rails” fails with DNS error

后端 未结 14 738
我在风中等你
我在风中等你 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:40

    I had the same problem when trying to install premailer and upgrading ruby to current stable version (2.3.0) fixed the issue.

    with rvm:

    rvm install 2.3.0
    
    rvm use 2.3.0
    
    gem install premailer 
    

    of course, this applies to any gem, not just premailer

提交回复
热议问题