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

相关推荐
掉进电商坑三年没爬出来的东叔10 小时前
云服务器搭建个人网站实战:从零到公网访问,含域名HTTPS
运维·服务器·https
我就是不信13 小时前
用 C 语言实现一个支持 HTML 与视频的 HTTP(S) 服务器
c语言·html·音视频
Lsetea1 天前
OpenSSL verify报unable to get issuer certificate:error 2与partial_chain排查
linux·https·ssl证书·openssl·证书链
天天进步20152 天前
Caddy 实战:5 分钟给域名开启 HTTPS,自动申请 SSL 证书并反向代理
网络协议·https·ssl
传人once2 天前
网页文字滚动效果如何做
前端·css·html·jquery·html5
redfred2 天前
HyperFrames 部署教程:5.6 万 Star 开源「写 HTML 出视频」框架,Windows 从零上手(CLI 三条命令 + 7 个避坑)
ffmpeg·开源·自动化·html·音视频
乌暮2 天前
拆解网页的底层逻辑:用费曼学习法讲透 HTML 与 CSS
前端·css·学习·html
xixingzhe22 天前
正确认知HTTPS:并非万能加密,通信安全需要多层防护
网络协议·安全·https
Lsetea2 天前
OpenSSL verify报unhandled critical extension:error 34与关键扩展排查
运维·https·ssl证书·openssl·证书链
传人once2 天前
多图片上传预览功能如何写
前端·css·html·jquery·html5