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

相关推荐
light_in_hand2 分钟前
HTTPS 加密流程总结
网络协议·http·https
elirlove16 分钟前
打造属于自己的网页工匠台:HTML在线编辑器技术深度解析
前端·编辑器·html
qq_363066931 小时前
react 使用web component导出静态html报告
前端·react.js·html·页面导出
weixin_457763081 小时前
展示youtube的视频
前端·javascript·html
雨翼轻尘1 小时前
03_HTML进阶标签与CSS入门
前端·css·html·入门·进阶标签
Arvin.Angela13 小时前
HTML5语义化标签深度解析:div、section与article的底层实现原理
html
奶油话梅糖16 小时前
浏览器解析 HTML 头部的底层逻辑:从字节流到资源调度
前端·html
tedcloud12318 小时前
HyperFrames部署教程:用HTML生成MP4视频
前端·数据库·人工智能·html·音视频
AI行业学习19 小时前
CC-Switch v3.16.1 官方下载 | 安装配置详细教程【2026.6.10】
java·开发语言·vue.js·python·mysql·eclipse·html
吠品20 小时前
一次 Nginx 报错 unexpected end of file 的排查记录
网络协议·https·ssl