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

相关推荐
GDAL2 小时前
Gin c.HTML 完整教程
html·gin
ZC跨境爬虫2 小时前
跟着 MDN 学 HTML day_58:(构建行星数据表——HTML表格高级实战指南)
前端·javascript·ui·html·音视频
栉甜2 小时前
APIs学习
前端·javascript·css·学习·html
Dxy12393102162 小时前
HTML的Iframe详解
前端·html
ZC跨境爬虫4 小时前
跟着 MDN 学 HTML day_60:(表单与按钮技能测试实战)
服务器·前端·javascript·数据库·ui·html
2601_958492554 小时前
A Technical Log: Hosting Gravity Dunk - HTML5 Casual game
前端·html·html5
ZHOUPUYU4 小时前
PHP8高性能Web开发实战指南
后端·html·php
xiaoxue..4 小时前
HTTPS:更安全的HTTP,从加密原理、数字证书到TLS 握手全解析
网络协议·面试·https
LaughingZhu5 小时前
Product Hunt 每日热榜 | 2026-05-17
前端·人工智能·chatgpt·html
2601_958492555 小时前
Behavioral Analysis of HTML5 Trivia Integration
前端·html·html5