我正在尝试构建一个 Rails 项目,因为我正在使用的主机无法访问 Internet 的 git://协议(protocol)(端口 9418),我收到如下错误
Fetching git://github.com/pivotal/jasmine.git
fatal: unable to connect to github.com:
github.com[0: 192.30.252.130]: errno=Connection refused
运行 bundle install
时。
GemFile 中的相关行没有指定 git://作为协议(protocol),它只是指向 GitHub 作为 gem 的源
gem 'jasmine', :github => 'pivotal/jasmine-gem'
我需要做什么才能使 bundler 使用 https://而不是 git://从 GitHub 拉取 gems?
编辑:
除了编辑 GemFile 中每个受影响的行之外,还有其他方法吗?如果项目的 GemFile 已更新,我宁愿避免任何合并问题。
最佳答案
使用bundle config github.https true
关于ruby - 强制 bundle 安装使用 https ://instead of git://for GitHub-based gems,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21260689/