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

相关推荐
用户2986985301413 小时前
React 中 HTML 内容转 Word 文档的实现方案
javascript·react.js·html
桃蹊、1 天前
串口/网络透传实战:FreeRTOS 多任务架构与连接池设计
stm32·物联网·wifi·freertos
XLYcmy1 天前
HTML/CSS/JS 基础与 Vue 技术栈深度解析
java·前端·css·html·vue3·vue2·api
Titan20242 天前
HTTPS基础知识梳理
服务器·网络·c++·网络协议·学习·http·https
晴天162 天前
HTML canvas标签使用指南-Day32
前端·html
FreeTinker2 天前
HTML本地存储技术解析:localStorage与sessionStorage的原理、差异与应用场景
前端·html
可乐鸡翅yeah_2 天前
第三方接口对接 M3U8 流媒体排坑实战,解决外部服务商流兼容难题
前端·javascript·python·django·html·m3u8·m3u8在线
梦醒沉醉2 天前
13、HTML入门——HTML中的表单和按钮
html
子非鱼a2 天前
【WEB】[NewStarCTF 公开赛赛道]UnserializeOne
前端·javascript·html