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

相关推荐
AI行业学习10 小时前
Notepad++ 官方下载 + 完整安装 + 全套优化配置(2026最新)
开发语言·人工智能·python·前端框架·html·notepad++
AlfredZhao15 小时前
Linux 主机防火墙如何同时开启 80 和 443?
http·https·firewall
小蜗牛的路21 小时前
使用OpenSSL生成本地证书https+nginx
网络协议·nginx·https
2501_930707782 天前
如何将HTML文件转换为纯文本(详细步骤指南)
前端·html
墨香幽梦客2 天前
数据安全三板斧:Https/SSL加密+PCI-DSS合规+HIPAA医疗数据防护
网络协议·https·ssl
牛奶5 天前
HTTPS你不知道的事
前端·https·浏览器
AlfredZhao8 天前
生产环境里,为什么不建议把普通端口直接暴露到公网?
linux·https·443·80
ZhengEnCi10 天前
Q02-Vue-React-index.html完全指南
vue.js·react.js·html
牧艺11 天前
HTML-in-Canvas 深度解析:让 Canvas 真正「吃上」HTML 这碗饭
前端·html·canvas
爱勇宝11 天前
我给自己做了一个新标签页:不登录、不打扰、打开就能用
前端·html·浏览器