亲测解决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

相关推荐
ZhengEnCi18 小时前
Q02-Vue-React-index.html完全指南
vue.js·react.js·html
牧艺2 天前
HTML-in-Canvas 深度解析:让 Canvas 真正「吃上」HTML 这碗饭
前端·html·canvas
爱勇宝2 天前
我给自己做了一个新标签页:不登录、不打扰、打开就能用
前端·html·浏览器
越努力越幸运663 天前
多模态代码调试实战:Gemini3.5 精准捕获 HTML 隐性语法
html
Avan_菜菜3 天前
FRP 内网穿透完整实战:从 HTTP 映射到 HTTPS 自签代理
运维·nginx·https
anOnion6 天前
构建无障碍组件之Menu Button pattern
前端·html·交互设计
米丘7 天前
微前端之 Web Components 完全指南
微服务·html
程序员mine10 天前
HTTPS-TLS加密与证书完全指南(中)
网络协议·https·ssl
Metaphor69210 天前
使用 Python 将 PDF 转换为 HTML
python·pdf·html
a11177610 天前
“黑夜流星“个人引导页 网页html
java·前端·html