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

相关推荐
幽络源小助理7 小时前
幽络源二次元分享地址发布页源码(HTML) – 源码网免费分享
前端·html
张较瘦_10 小时前
前端 | 代码可读性 + SEO 双提升!HTML 语义化标签实战教程
前端·html
0思必得011 小时前
[Web自动化] JS基础语法与数据类型
前端·javascript·自动化·html·web自动化
Dreamcatcher_AC11 小时前
前端面试高频问题解析
前端·css·html
foo1st13 小时前
HTML中常用HASH算法使用笔记
javascript·html·哈希算法
有趣灵魂13 小时前
Java-Spingboot根据HTML模板和动态数据生成PDF文件
java·pdf·html
inferno14 小时前
HTML基础(第二部分)
前端·html
elangyipi12315 小时前
前端面试题:如何减少页面重绘跟重排
前端·面试·html
bjzhang7516 小时前
使用 HTML + JavaScript 实现级联选择器
前端·javascript·html