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

相关推荐
子夜江寒5 小时前
HTML 基础知识
前端·学习·html
www_stdio7 小时前
手写 instanceof:深入理解 JavaScript 原型与继承机制
前端·javascript·html
阿珊和她的猫9 小时前
UTF - 8 编码在 HTML 中的重要性
前端·html
恶猫9 小时前
抖音直播时,飘窗提示的html窗口,主播不在,正在喝9
前端·html·直播·抖音·素材
代码不停11 小时前
HTTP / HTTPS详细介绍
网络协议·http·https
韩曙亮12 小时前
【Web APIs】元素偏移量 offset 系列属性 ④ ( offset 属性案例 - 放大镜效果 )
前端·javascript·css·html·offset·dom·web apis
#微爱帮#12 小时前
微爱帮监狱寄信写信平台HTTPS隐私保护方案
网络协议·http·https·监狱寄信·监狱写信
余俊晖13 小时前
大模型网页数据清洗工具思路:MinerU-HTML
人工智能·html·数据生成
海市公约1 天前
HTML网页开发从入门到精通:从标签到表单的完整指南
前端·ide·vscode·程序人生·架构·前端框架·html
LSL666_1 天前
4 jQuery、JavaScript 作用域、闭包与 DOM 事件绑定
前端·javascript·html