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

相关推荐
anOnion4 小时前
构建无障碍组件之Meter Pattern
前端·html·交互设计
修己xj5 小时前
Markdown 里写公式,别只知道 LaTeX!试试 HTML 标签,简单到飞起
html
hhcccchh8 小时前
1.1 HTML 语义化标签(header、nav、main、section、footer 等)
java·前端·html
bjzhang759 小时前
使用 HTML + JavaScript 实现组织架构图
前端·javascript·html·组织架构图
AscendKing11 小时前
免费、易用、覆盖全平台的网页转 PDF 工具
pdf·html·网页保存·网页保存为pdf·保存网页位pdf
ZC跨境爬虫14 小时前
海南大学交友平台登录页开发实战day4(解决python传输并读取登录信息的问题)
开发语言·前端·python·flask·html
杨凯凡14 小时前
【002】HTTPS 粗解:证书、TLS 握手与对后端配置的影响
网络协议·http·https
AI_Claude_code15 小时前
ZLibrary访问困境方案二:DNS-over-HTTPS/TLS配置与隐私保护实践
爬虫·python·网络协议·http·网络安全·https·网络爬虫
邓霖涛15 小时前
nginx使用openSSL自签生成https相关证书
服务器·nginx·https
yivifu16 小时前
一种更精细的HTML表格斑马色设置方法
前端·html