亲测解决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_xiaogui7 小时前
PanelAI没有域名也能装?IP安装+自签HTTPS+安全加固全攻略(私有化部署必备)
tcp/ip·安全·https·私有化部署·自签证书·panelai·自带https自动续证
W.W.H.8 小时前
嵌入式 Linux外接USB/WIFI模块兼容5G频段实战
linux·运维·5g·wifi
杨超越luckly11 小时前
Agent应用指南:基于 SPTCC 一卡通数据的上海地铁客流特征分析(2015.04)
html·agent·可视化·一卡通·地图客流
2601_9657984712 小时前
Arrow Unlocker HTML5 Game Review: Keep Web Arcade Players Coming Back
前端·html·html5
醉城夜风~13 小时前
HTML常用标签详解学习博客:从基础标签到页面结构完整掌握
前端·学习·html
带娃的IT创业者15 小时前
单文件架构的极致美学:深入解析 Bento 的 HTML 幻灯片技术实现
前端·架构·html·web开发·bento·单文件架构
IMPYLH16 小时前
HTML 的 <dl> 元素
linux·windows·html
用户298698530141 天前
在 PC 上将 HTML 转换为 PDF 的3种有效方法
人工智能·c#·html
IMPYLH2 天前
HTML 的 <dialog> 元素
前端·html
2501_915909062 天前
iOS应用性能监控 Instruments工具与崩溃日志分析完整指南
android·ios·小程序·https·uni-app·iphone·webview