“gem install rails” fails with DNS error

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

    I'm using openSUSE 13.1 OS for my rails development. Suddenly I got the same issue and reported to the SUSE mailing list. And then got an very good explanation about the problem here.

    Background: the tld ".site" is offically registered and thus no longer available for private use.

    ToDo: Change your private tld, to something NOT registered.

    Gotchas: ".local" is reserved for mDNS / ZeroConf / Bonjour / Rendezvous. Do NOT use it for DNS / DHCP !

    Examples: ".box", ".lan" : both are suggested by some Internet-Connect-Routers (DSL/Cable/Fibre) ".lnet", ".your-name-here" (.ArupRakshit for you) : possible, worth to try.

    HTH, Yamaban.

    I followed his instrutions here

    For future reader goto YAST -> Netwrok devices -> Network Settings -> Hostname/DNS -> Domain Name (and here put your name).

    [arup@Rails]$ gem install rails --no-ri --no-rdoc
    Fetching: thread_safe-0.3.5.gem (100%)
    Successfully installed thread_safe-0.3.5
    Fetching: tzinfo-1.2.2.gem (100%)
    Successfully installed tzinfo-1.2.2 
    
    
    Fetching: i18n-0.7.0.gem (100%) 
    ........
    ........
    [arup@Rails]$ rails -v
    Rails 4.2.0
    

    Now all is set. :)

提交回复
热议问题