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

相关推荐
落叶_Jim7 小时前
没有 DNS 权限怎么申请 SSL 证书?HTTP 文件验证实操
网络协议·http·https·ssl
程序猿追8 小时前
HarmonyOS 7 剪贴板读写,同一份内容怎样带上纯文本和 HTML
华为·html·harmonyos
AnTrust8 小时前
建站公司怎么给客户打包HTTPS服务:报价、交付和售后流程
网络协议·http·https
Lsetea1 天前
DNS-01 委托有 CNAME 却查不到 TXT?用 CertbotX 核对签发前和挑战中的记录
运维·https·ssl·dns·acme
D_C_tyu1 天前
AI能力测试·PRD文档分享 | 3D高山滑雪小游戏HTML页面
人工智能·3d·html
D_C_tyu1 天前
AI能力测试·PRD文档分享 | 沉浸式海底世界HTML页面
前端·人工智能·html
matianlongg2 天前
竖屏片头写成 HTML,HyperFrames 直接导出能进剪映的 MP4
开源·html·mp4·短视频·抖音·剪映·hyperframes
码云数智-园园2 天前
HTML5 FileReader 读取本地文件,前端上传预览原理
前端·html·html5
feasibility.3 天前
电脑一天重启3次、WiFi还消失:蓝屏0x9F背后,是MT7921网卡撞上Windows电源管理
服务器·网络·windows·wifi·电脑·网卡·驱动
程序员蜡笔熊3 天前
HTML attribute 和 DOM property,根本不是一回事
java·前端·html