亲测解决Bundler HTTPError Could not fetch specs from

这个问题源于ruby的网站连接不上,解决方法是修改网页地址或者网络配置。

环境

win11 + ruby

问题原文

c 复制代码
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from 
https://rubygems.org/ due to underlying error <IO::TimeoutError: Failed to open TCP connection to rubygems.org:443 (Blocking operation timed out!) (https://rubygems.org/specs.4.8.gz)>

解决方法

方法一

打开Gemfile,将https改成http,Open the Gemfile and change first line from this:

c 复制代码
source 'https://www.rubygems.org'

to this

python 复制代码
source 'http://www.rubygems.org'

remove the 's' from 'https'.

方法二

一般方法一就可以解决了,如果不行尝试换一个网络:比如手机wifi。

Change it to another network (mobile hotspot)

方法三

关闭ipv6的配置。

参考

https://stackoverflow.com/a/47392700/15329637

https://stackoverflow.com/questions/51201517/ruby-cant-connect-to-rubygems-org

相关推荐
C++chaofan10 小时前
JUC 中 synchronized 的底层实现原理解析——Monitor
java·开发语言·c++·rust·ruby·juc·字节码
程序员刘禹锡10 小时前
定位与图标字体知识点全解析!!!(12.31)
前端·css·html·css3
linux修理工10 小时前
vagrant vmware
运维·ruby·vagrant
源远流长jerry10 小时前
http协议和https协议的连接流程
网络·http·https
json{shen:"jing"}10 小时前
06_事件处理
前端·javascript·html
松涛和鸣11 小时前
44、HTML与HTTP服务器交互笔记
linux·运维·服务器·http·链表·html
hxjhnct12 小时前
https,WebSocket,tcp的关系
网络协议·tcp/ip·https
烤麻辣烫12 小时前
黑马大事件学习-19(文章)
前端·css·vue.js·学习·html
聪明的Levi14 小时前
FRONT END REVIEW
前端·css·html
落叶_Jim14 小时前
网站出现“不安全“红色警告怎么办?5步消除浏览器拦截
安全·https·ssl