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

相关推荐
杨超越luckly8 小时前
Agent应用指南:13年与13线——武汉地铁进化史
数据分析·html·agent·可视化·地铁客流
記億揺晃着的那天9 小时前
HTTPS 页面内网直连 NAS:解决 Mixed Content 与公网带宽瓶颈
网络协议·http·https·nas
難釋懷10 小时前
Nginx代理https请求
redis·nginx·https
葡萄城技术团队11 小时前
HTML元素单元格:用自定义 CellType 扩展 SpreadJS 的显示能力
前端·javascript·html
逝水无殇11 小时前
HTML 属性(HTML Attributes)详解
开发语言·前端·html·html5
码农学院1 天前
2026年生成式搜索引擎优化对服务业本地化获客帮助的数字化转型路径
前端·搜索引擎·html
浮江雾1 天前
Flutter第十六节-----路由管理(2)
android·开发语言·前端·javascript·flutter·html
shandianchengzi1 天前
【开源工具】我做了一个周深歌曲淘汰赛生成器:挑选 128 首歌 PK,选出你的年度 TOP1
html·音乐·网页·世界杯
触底反弹2 天前
一文搞懂 Tailwind CSS 弹性布局:从原理到实战
前端·css·html
两点王爷2 天前
一个快速加载面和多面数据的html测试页面(可以导出geojson数据文件)
前端·html·gis