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

相关推荐
ShineWinsu9 小时前
对于JavaScript:初识JavaScript以及输入输出
java·开发语言·前端·javascript·css·面试·html
青瓦梦滋10 小时前
【在线五子棋对战】游戏匹配模块
网络·c++·网络协议·http·https
码银10 小时前
【web】基于HTML/CSS,JavaScript + Three.js做3D流程图
前端·css·html
小熊在忙fpga12 小时前
N32G430芯片的flash表示
前端·javascript·html
java1234_小锋12 小时前
【技术专题】HTML5 网页技术 - HTML5 表格标签
前端·html·html5
东鹏特饮13 小时前
全屏黑客终端(自动入侵 + 进度条)
html·恶搞
燕落南枝13 小时前
HTML 学习笔记:从基础到音频标签
笔记·学习·html
java1234_小锋1 天前
【技术专题】HTML5 网页技术 - HTML5简介 & HTML5 文档结构
前端·html·html5
keyipatience1 天前
JS学习笔记(2)数组,函数,作用域,对象
前端·javascript·笔记·学习·html
java1234_小锋1 天前
【技术专题】HTML5 网页技术 - HTML5 列表标签
前端·html·html5