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

相关推荐
数据知道1 天前
HTTP/HTTPS 安全深度剖析:抓包、解密与证书陷阱
安全·http·https·mitmproxy·抓包解密
阿酷tony1 天前
纯HTML5播放器带倍速、带画质切换的播放器
前端·html·html5
2501_915106321 天前
iOS 软件测试工具性能监控、日志分析 KeyMob、Instruments等
android·ios·小程序·https·uni-app·iphone·webview
iCOD3R2 天前
【趣站精选】2026-07-13
开源·html
H Journey2 天前
web开发学习:html、css、js
前端·css·html·js
今日无bug2 天前
Emmet 语法速成指南
前端·css·html
kisshyshy2 天前
前端存储、表单异步提交与 this 指向完全指南
前端·javascript·html
韩曙亮2 天前
【Flutter】iOS 网络权限设置 ② ( 配置 iOS 平台可使用 HTTP 访问 | ATS 网络安全强制规范 )
网络·flutter·http·ios·https·网络权限·ats
এ慕ོ冬℘゜3 天前
JavaScript 数据类型检测与转换、运算符超全实战详解
前端·html
笺落彼岸3 天前
SpringBoot3 JDK17集成proguard实现混淆打包
安全·https