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

相关推荐
Lsetea14 小时前
Certbot webroot申请SSL证书总是404:Nginx挑战目录与路径映射检查
运维·nginx·https·ssl证书·certbot
山乐1913119 小时前
麒麟系统,安装Nginx并配置https证书
运维·nginx·https
zhippt_101421 小时前
教师做课件太耗时?AI生成PPT工具与图转PPT实测梳理
人工智能·html·powerpoint
tedcloud1231 天前
Docker Compose 部署 Uptime Kuma:配置 HTTPS、QQ 邮箱告警与数据备份
服务器·网络协议·ui·docker·容器·https·开源
嵌入式学习菌1 天前
HTTP/HTTPS、MQTT/MQTTS 区别
网络协议·http·https
winfredzhang1 天前
从零手写一个毛玻璃风格的页面搭建台:单文件 HTML 实现组件放置、面板磁吸与图层管理
前端·html
2501_915106321 天前
抓包抓到乱码或压缩字节怎么解析,TraceEagle五种查看模式和一键解码
网络协议·计算机网络·网络安全·ios·adb·https·udp
沫璃染墨2 天前
从零入门计算机网络系列(十一):HTTP协议进阶——从重定向原理到GET/POST与Fiddler抓包
linux·服务器·开发语言·网络·c++·tcp/ip·html
前端架构师-老李2 天前
HTML与CSS基础第五课—HTML的空格、换行、横线相关知识
前端·css·html
echome8882 天前
CSS 布局:Flex 和 Grid 怎么选,附常见坑
前端·css·html