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

相关推荐
Icoolkj7 小时前
ICOOLKJ 前后端分离项目完整部署文档(MySQL8.4+Redis+JDK21+Nginx+HTTPS+自动同步演示库)
redis·nginx·https
LaughingZhu9 小时前
Product Hunt 每日热榜 | 2026-07-17
前端·数据库·人工智能·经验分享·mysql·chatgpt·html
2501_915106321 天前
TraceEagle 代理抓包教程 本机和手机的 HTTPS 抓包方法
网络协议·计算机网络·网络安全·ios·adb·https·udp
天若有情6731 天前
纯HTML+Tailwind单页作品集网站——零框架静态前端完整源码
前端·html
qq_419854051 天前
空间网格管理器
前端·javascript·html
天若有情6731 天前
Dev_Portfolio 个人主页html网页源码分享!!!
前端·html·源码·个人主页
云水一下1 天前
零基础玩转 bWAPP 靶场(五):HTML 注入——存储型(博客)
web安全·html·bwapp·存储型注入
芯日记1 天前
Mac-使用文本编辑的html浏览器打开出现源代码问题
macos·html
TlSfoward1 天前
TLSFOWARD抓包工具 TLS指纹
网络协议·http·百度·https
杨超越luckly1 天前
Agent应用指南:利用POST请求获取麦当劳门店位置信息
人工智能·arcgis·html·数据可视化·麦当劳