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

相关推荐
是良辰4 小时前
Docker Nginx HTTPS 自签证书部署完整操作文档
nginx·docker·https
AI人工智能+电脑小能手5 小时前
【大白话说Java面试题 第216题】【10_网络协议篇】第7题:HTTP 协议和 HTTPS 协议的区别
java·http·网络安全·https·ssl/tls
weipt8 小时前
springboot项目运行的几种方式
javascript·css·html
七月稻草人10 小时前
Grafana只能在内网看?配置HTTPS公网地址远程打开监控面板
网络协议·https·grafana
kaixin_啊啊10 小时前
群晖部署Vaultwarden:HTTPS访问、自动填充与密码迁移
网络协议·http·https
呼噜想睡觉1 天前
Flex弹性布局
css·html·css3
AI行业学习1 天前
Claude Code + cc-switch + Git + Node.js 全套下载+安装+配置完整版
开发语言·git·python·前端框架·node.js·html·notepad++
TlSfoward1 天前
TLSFoward 能帮你看到什么 TLSFOWARD抓包工具
服务器·爬虫·网络协议·https
并不喜欢吃鱼1 天前
一.前端web开发:零基础吃透 HTML5 核心知识
前端·html·html5
2501_916007471 天前
Python实现HTTPS爬虫的完整指南:使用requests、BeautifulSoup、Selenium和Scrapy
爬虫·python·ios·小程序·https·uni-app·iphone