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

相关推荐
杨超越luckly3 小时前
Agent应用指南:基于 SPTCC 一卡通数据的上海地铁客流特征分析(2015.04)
html·agent·可视化·一卡通·地图客流
2601_965798474 小时前
Arrow Unlocker HTML5 Game Review: Keep Web Arcade Players Coming Back
前端·html·html5
醉城夜风~5 小时前
HTML常用标签详解学习博客:从基础标签到页面结构完整掌握
前端·学习·html
带娃的IT创业者7 小时前
单文件架构的极致美学:深入解析 Bento 的 HTML 幻灯片技术实现
前端·架构·html·web开发·bento·单文件架构
IMPYLH8 小时前
HTML 的 <dl> 元素
linux·windows·html
用户298698530141 天前
在 PC 上将 HTML 转换为 PDF 的3种有效方法
人工智能·c#·html
IMPYLH1 天前
HTML 的 <dialog> 元素
前端·html
2501_915909061 天前
iOS应用性能监控 Instruments工具与崩溃日志分析完整指南
android·ios·小程序·https·uni-app·iphone·webview
2301_764441332 天前
智慧农业管理平台灵感
开源·html
a1117762 天前
3D 建筑编辑器 Pascal Editor THreeJS 开源
前端·3d·html