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

相关推荐
Waitccy32 分钟前
Tomcat 配置 HTTPS 访问全攻略(CentOS 环境)
https·centos·tomcat·安全整改
Yvonne爱编码1 小时前
CSS- 2.1 实战之图文混排、表格、表单
前端·css·html·github·状态模式·html5·hbuilder
SHIPKING39311 小时前
【HTML】个人博客页面
javascript·css·html
Yvonne爱编码12 小时前
HTML-3.3 表格布局(学校官网简易布局实例)
前端·html·github·html5·hbuilder
小屁孩大帅-杨一凡14 小时前
一个简单点的js的h5页面实现地铁快跑的小游戏
开发语言·前端·javascript·css·html
-SGlow-14 小时前
Linux相关概念和易错知识点(40)(HTML资源交互、网页管理、搜索引擎)
linux·运维·服务器·网络·html·交互
利刃大大15 小时前
【网络编程】九、详解 HTTPS 加密原理
网络·网络协议·https
Think Spatial 空间思维19 小时前
【SSL证书系列】https双向认证中客户端认证的原理
网络协议·https·ssl·双向认证·客户端认证
HBR666_20 小时前
面试--HTML
面试·html
Think Spatial 空间思维1 天前
【HTTPS基础概念与原理】SSL/TLS协议演进史:从SSLv3到TLS 1.3
网络协议·https·ssl