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

相关推荐
rzl024 小时前
HTML/JOSN复习总结
前端·html
不7夜宵8 小时前
HTTP和HTTPS部分知识点
网络协议·http·https
Sapphire~19 小时前
重学前端004 --- html 表单
前端·html
daikaimiao21 小时前
https——TCP+TLS
网络协议·tcp/ip·https
gzzeason1 天前
在HTML中CSS三种使用方式
前端·css·html
yqcoder1 天前
12. 说一下 https 的加密过程
网络协议·http·https
荔枝hu1 天前
springboot生成pdf方案之dot/html/图片转pdf三种方式
spring boot·pdf·html
灵犀学长1 天前
解锁HTML5页面生命周期API:前端开发的新视角
前端·html·html5
2501_915918412 天前
Fiddler中文版全面评测:功能亮点、使用场景与中文网资源整合指南
android·ios·小程序·https·uni-app·iphone·webview
兴趣使然_2 天前
【笔记】使用 html 创建网址快捷方式
笔记·html·js