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

相关推荐
AI_56781 天前
RabbitMQ消息队列:高可用集群搭建与消息幂等处理
开发语言·后端·ruby
极客小俊1 天前
【H5 前端开发笔记】第 03 期:HTML的历史、书写规范与文档类型声明<!DOCTYPE> 详解
html·学习笔记·前端开发·编程基础·免费教程·html文档类型声明·零基础学习
2501_915918411 天前
iOS App HTTPS 抓包工具,代理抓包和数据线直连 iPhone 抓包的流程
android·ios·小程序·https·uni-app·iphone·webview
捧 花1 天前
Go + Gin 实现 HTTPS 与 WebSocket 实时通信
websocket·golang·https·go·gin
像风一样的男人@1 天前
python --html转pdf/pdf分页优化
python·pdf·html
Never_Satisfied1 天前
在JavaScript / HTML中,获取指定元素的父元素
开发语言·javascript·html
二月夜1 天前
HTTPS页面中img标签图片无法显示的问题排查与彻底解决
网络协议·http·https·图片
anOnion4 天前
构建无障碍组件之Switch Pattern
前端·html·交互设计