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

相关推荐
sudebao点com14 分钟前
一次“Google 能打开,FlexTV 打不开”的 DNS 故障排查:从 curl 超时到完整证据链
windows·macos·https·cdn·dns·nslookup·网络排错
月落汀兰10 小时前
Linux Nginx全套实战通关|静态站点/虚拟主机/HTTPS/PHP/反向代理/七层负载均衡,每行命令逐参数拆解
linux·nginx·https
水无痕simon12 小时前
3 RabbitMQ基础
分布式·rabbitmq·ruby
梦醒沉醉12 小时前
1、HTML入门——HTML基本语法
html
zh_xuan1 天前
github搭建个人主页
html·github
运维全栈笔记1 天前
致远 OA HTTPS 配置避坑指南
网络协议·http·https
2501_915909061 天前
iOS test 测试怎么做?功能、性能、兼容、稳定与安全五类测试指南
android·ios·小程序·https·uni-app·iphone·webview
小妖6661 天前
设置了 box-sizing: border-box; 不管用,下边框还是被挤压没了
前端·css·html
鬼手点金2 天前
Scrapy 网络爬虫框架
爬虫·python·scrapy·ajax·html·json·requsts
daad7772 天前
用 HackRF + GNU Radio 抓取并解析 5 GHz Wi‑Fi 帧:从理论到 pcap 落地
wifi·802.11·gnuradio·beacon