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

相关推荐
inksci19 小时前
用飞帆做了个小网页
前端·javascript·css·html
zhanlang02171 天前
HTML 零基础入门到企业实战【第八章 8.5】画布 canvas、SVG 矢量图形基础入门
前端·html
xbzb1 天前
用 Secret + ConfigMap + PV/PVC 部署 WordPress:一套能跑 https 的最小组合
http·https·wordpress·configmap·secret·pod
zhanlang02171 天前
HTML 零基础入门到企业实战全套教程【连载 8.4】HTML5 新增表单属性与表单控件
前端·html·html5
狮子座的男孩2 天前
html+css基础:31、响应式布局(媒体类型,媒体特性,运算符,常用阈值)
前端·css·经验分享·html·响应式布局·媒体类型/特性·常用阈值
SemiTris2 天前
Web 前端底层起源:HTML/CSS/JS、浏览器与 HTTP 完整脉络
http·html
狮子座的男孩2 天前
html+css基础:32、BFC(父子元素防止 margin 塌陷,父子元素清除浮动,兄弟元素两栏布局)
前端·css·经验分享·html·bfc·margin塌陷·清除浮动
zhanlang02172 天前
HTML 零基础入门到企业实战全套教程【第八章 8.3】HTML5 语义化标签|SEO 优化、页面布局实战应用
前端·html·html5
用户298698530143 天前
React 前端实现 Excel 与 HTML 双向转换:基于 WebAssembly 的浏览器端方案
javascript·html·excel
htzyl2064 天前
前端样式-弹窗淡入淡出,为什么你的 `transition` 一直不生效
前端·css·html