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

相关推荐
木木黄木木2 小时前
HTML5 Canvas绘画板项目实战:打造一个功能丰富的在线画板
前端·html·html5
无职转生真好看2 小时前
HTTP和HTTPS区别
网络协议·http·https
海底火旺4 小时前
使用WEUI框架与BEM规范构建按钮组件实践指南
前端·css·html
羊思茗5204 小时前
探索HTML5 Canvas:创造动态与交互性网页内容的强大工具
前端·html·html5
金丝猴也是猿9 小时前
手机硬件检测详解:从版本信息到相机功能的全面指南
websocket·网络协议·tcp/ip·http·网络安全·https·udp
你住过的屋檐13 小时前
【RabbitMQ】Linux上安装RabbitMQ详细步骤
linux·rabbitmq·ruby
NaZiMeKiY16 小时前
HTML5前端第六章节
前端·html·html5·1024程序员节
iOS技术狂热者19 小时前
wireshark开启对https密文抓包
websocket·网络协议·tcp/ip·http·网络安全·https·udp
zru_960219 小时前
HTML 标签类型全面介绍
前端·html
zru_960219 小时前
java替换html中的标签
java·前端·html