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

相关推荐
清清&7 小时前
【网络】一文读懂HTTPS协议
网络·https·智能路由器
CappuccinoRose8 小时前
HTML语法学习文档(五)
前端·html·html5·表单
a11177619 小时前
优雅简历(html开源)
前端·开源·html
明月_清风21 小时前
HTML 早已不是标签了,它现在是系统级接口:这 9 个 API 直接干翻常用 JS 库
前端·html
岱宗夫up21 小时前
【前端基础】HTML + CSS + JavaScript 快速入门
前端·css·html
~央千澈~21 小时前
2026 年 2 月 17 日(农历大年初一),优雅草科技正式启用最新版官网·并且依然开源代码
html
前端 贾公子1 天前
深入理解 Vue3 的 v-model 及自定义指令的实现原理(下)
前端·html
猫头虎2 天前
web开发常见问题解决方案大全:502/503 Bad Gateway/Connection reset/504 timed out/400 Bad Request/401 Unauthorized
运维·前端·nginx·http·https·gateway·openresty
qq_24218863322 天前
3389端口内网转发概述
前端·经验分享·html
Never_Satisfied2 天前
在JavaScript / HTML中,数组查找第一个符合要求元素
开发语言·javascript·html