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

相关推荐
奇舞精选1 天前
写 HTML 就能做视频?HeyGen 开源的这个工具有点意思
html·agent
河阿里1 天前
HTML5标准完全教学手册
前端·html·html5
W.W.H.1 天前
通过WiFi获取仪器所在经纬度
经验分享·wifi
之歆1 天前
Day03_HTML 列表、表格、表单完整指南(下)
android·javascript·html
索木木1 天前
ShortCut MoE模型分析
前端·html
困惑阿三1 天前
Nginx 域名绑定与 HTTPS 配置指南
运维·nginx·https·ssl
之歆1 天前
Day02_HTML 标签详解:从基础到实践的完整指南
css·html·div
We་ct2 天前
HTML5 原生拖拽 API 实战案例与拓展避坑
前端·html·api·html5·拖拽