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

前端 未结 14 2119
抹茶落季
抹茶落季 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 14:04

    you can try the following, if in windows:

    set HTTP_PROXY= <your proxy address without http://>
    
    set HTTPS_PROXY=%HTTP_PROXY%
    

    For eg:

    HTTP_PROXY=mycompany.myproxy.com:8080
    
    HTTPS_PROXY=%HTTP_PROXY%
    

    Worked for me

    0 讨论(0)
  • 2021-02-01 14:11

    For me, restarting the computer worked. I had already reinstalled ruby, updated bundler, removed 's' https:// but none of them worked!

    0 讨论(0)
  • 2021-02-01 14:12

    CHange your source form https to http after run

    sudo bundle update sudo bundle install

    0 讨论(0)
  • 2021-02-01 14:14

    The other reason causing such that issues is the fact if you are behind proxy server. I describe here solution, maybe it will be usefull for someone else. :)

    In case that you did not know Login/pass for yours proxy, and meet this issues you could firstly check if you need to (re)install anything, by command:

    C:\...> bundle check
    Resolving dependencies...
    The Gemfile's dependencies are satisfied
    

    If you get other respons then above, you could find properly gems in properly versions here (rubygems.org), then install it (from the directory with downloaded gem) by command:

    gem install <gem-name> --locally 
    
    0 讨论(0)
  • 2021-02-01 14:14

    Adding variable for proxy worked fine.

    Additionally if you are using Bitnami redmine like me you can add that into setenv.bat then when you start command line with Bitnami Redmine short cut it will be automatically added to your environment. You can find this under Bitnami installation folder.

    0 讨论(0)
  • 2021-02-01 14:14

    If you are using Cloud9, just restart (command R) and try again

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