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

相关推荐
jnene6 小时前
html 时间、价格筛选样式处理
前端·css·html
slongzhang_7 小时前
jquery 修复怪异模式html未声明“<!DOCTYPE html>”
前端·html·jquery
IMPYLH9 小时前
HTML 的 <abbr> 元素
前端·算法·html
神明不懂浪漫10 小时前
【第三章】CSS(一)——基础选择器、CSS的属性
前端·css·html·css3
小小龙学IT10 小时前
HTMX:让 HTML 重新成为前端核心的超轻量动态交互库
前端·html·交互
大神157312 小时前
Jetty 6 HTTPS 配置指南
网络协议·https·jetty
matlab_xiaowang12 小时前
WeasyPrint:把 HTML 变成 PDF 的文档工厂
前端·其他·pdf·html
gz-郭小敏1 天前
优化横向滚动展示大量数据的时候数据晃动问题
前端·javascript·html·css3
IMPYLH1 天前
HTML 的 <a>元素
前端·javascript·html
AI行业学习1 天前
CC‑Switch v3.16.1 免费下载(Windows+macOS+Linux)、使用方法【2026.6.11】
linux·开发语言·windows·python·macos·前端框架·html