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

相关推荐
xcLeigh7 小时前
Doubao-Seed-Evolving大模型接入教程|搭建全品类提示词+AI工具导航网页
前端·人工智能·python·ai·html·ai开发·豆包
2301_794461579 小时前
JavaScript 基础知识点详解
前端·javascript·html
门前大桥下.9 小时前
HTML-01我的第一个网页
前端·html
datagear9 小时前
DataGear 6.0.0 新特性之本地图表
数据分析·html·数据可视化
An_s11 小时前
Android仿真翻页(一),基于pagecurl二开
前端·javascript·html
weixin_4629019711 小时前
网页 HTML ↔ ESP32 完整通信体系详解
前端·html
触底反弹21 小时前
前后端通信不是魔法,是 HTTP 协议、数据格式和浏览器安全机制共同演奏的交响曲
http·https·浏览器
2301_794461571 天前
HTML入门
前端·html
Android-Flutter1 天前
Android的http和https知识点
android·http·https