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

相关推荐
三乐2289 小时前
简单定位布局
html
Zzzzmo_10 小时前
【HTML+CSS+JavaScript】01 HTML标签
html
软件技术NINI15 小时前
泉州html+css 4页
前端·javascript·css·html
Python大数据分析@17 小时前
HTML会代替Markdown吗?为什么?
前端·html
一棵树735117 小时前
js总结介绍
前端·javascript·html
ZC跨境爬虫18 小时前
跟着 MDN 学CSS day_2:(连接样式表与选择器的实战艺术)
java·前端·css·ui·html·媒体
ZC跨境爬虫18 小时前
跟着 MDN 学CSS day_1:(CSS 基石与色彩的艺术)
前端·javascript·css·ui·html
或与且与或非19 小时前
rabbitmq选举集群搭建
分布式·rabbitmq·ruby
ZC跨境爬虫19 小时前
模块化烹饪小程序开发日记 Day4:网络层基础设施与接口治理实践
前端·javascript·数据库·ui·html
KnowSafe19 小时前
如何用OpenSSL生成CSR文件?
服务器·https·ssl