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

相关推荐
前端 贾公子1 天前
《Vuejs设计与实现》第 18 章(同构渲染)(下)
前端·javascript·html
Never_Satisfied1 天前
在JavaScript / HTML中,词内断行
开发语言·javascript·html
whltaoin1 天前
中秋赏月互动页面:用前端技术演绎传统节日之美
前端·javascript·html·css3·中秋主题前端
tryCbest1 天前
Windows和Linux设置Https(SSL)访问
linux·windows·https
qq_402605652 天前
python爬虫(一) ---- 静态html数据抓取
爬虫·python·html
Gary Studio2 天前
ESP32 IDF GET_HTTPS
网络协议·https·php
半桔2 天前
【网络编程】揭秘 HTTPS 数据安全:加密方案与证书体系的协同防护
linux·网络·网络协议·http·https
Never_Satisfied2 天前
在JavaScript / HTML中,转移字符导致js生成的html出错
开发语言·javascript·html
程序_白白2 天前
介绍一下什么是RabbitMQ的发送者可靠性?
分布式·rabbitmq·ruby
祈祷苍天赐我java之术3 天前
Redis 有序集合解析
java·前端·windows·redis·缓存·bootstrap·html