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

相关推荐
a11177614 小时前
卡通风格 UI 组件库html (TRIZ UI Kit [特殊字符])
前端·ui·html
a11177617 小时前
星球主题个人主页(纯HTML 开源)
前端·html
Never_Satisfied19 小时前
在JavaScript / HTML中,img标签loading lazy加载时机详解
开发语言·javascript·html
a11177619 小时前
波浪圆圈背景效果(html 开源)
前端·html
Boxsc_midnight20 小时前
【windows电脑浏览器直接访问虚拟机或云端openclaw的方法】一个不需要HTTPS的安全连接通道(基于SSH)
windows·安全·https·openclaw
摇滚侠21 小时前
bootstrap 框架讲解-快速上手,最适合后端开发人员的bootstrap 保姆级使用教程
前端·bootstrap·html
2301_8059629321 小时前
从零开始写第一个网页——HTML结构入门教程(小白友好)
前端·html
a11177621 小时前
个人展示页面(html 线条交互)
前端·开源·html
Never_Satisfied21 小时前
在HTML & CSS中,CSS选中第二个指定类型的子元素的方法
前端·css·html
Never_Satisfied21 小时前
在HTML & CSS中,图片嵌入文字方法
前端·css·html