Bundle Install could not fetch specs from https://rubygems.org/

前端 未结 14 2145
抹茶落季
抹茶落季 2021-02-01 13:20

I\'m attempting to follow the Hartl Rails Tutorial, and having trouble with the bundler gem.

When using the commands \'bundle install\' or \'bundle update\' I get the fo

相关标签:
14条回答
  • 2021-02-01 13:50

    Just in case none of the above satisfies the next intrepid explorer, I thought I'd drop here that after I spent 4 hours on this doing variants of the search that landed me here, I finally discovering that IPV6 was the culprit, after finding this specific thread on help.rubygems.org. Solution? this (Fedora, Linux):

    sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
    sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
    

    set up a shell script to flip IPV6 on and off so I could run a command without it, and now everything runs peachy.

    0 讨论(0)
  • 2021-02-01 13:52

    I had the same issue using ruby-2.0.0-p247 on OS X 10.8.5.

    Make sure the first line in Gemfile is using https://

    source 'https://rubygems.org'
    

    I reinstalled that version of ruby.

    rvm reinstall ruby-2.0.0
    

    Ruby was upgraded ruby-2.0.0-p598 (version depends on latest patch).

    bundle then worked without error although all the gems were reinstalled.

    0 讨论(0)
  • 2021-02-01 13:52

    Mine was just a simple network issue, just restart pc / router

    0 讨论(0)
  • 2021-02-01 13:53

    It can be temporary network issue as well. Try restarting network services using command

    service network restart
    

    If its *nix machine.

    0 讨论(0)
  • 2021-02-01 13:54

    Sometimes it happens due to proxy you are using. I tried to resolve this by using a connection without proxy and all worked perfectly fine.
    Then try:

    bundle update
    

    And then go for

    bundle install
    
    0 讨论(0)
  • 2021-02-01 13:58

    Either with http or https did not work.

    After I disabled the IP v6, it worked

    https://support.purevpn.com/how-to-disable-ipv6-linuxubuntu

    0 讨论(0)
提交回复
热议问题