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

相关推荐
淮北4941 小时前
html + css +js
开发语言·前端·javascript·css·html
asdfsdgss6 小时前
多项目共享资源:Ruby 定时任务基于 Whenever 的动态扩缩容
java·网络·ruby
焚 城6 小时前
EXCEL(带图)转html【uni版】
前端·html·excel
2501_916008897 小时前
iOS混淆实战用多工具组合把IPA加固做成可复用的工程能力(iOS混淆 IPA加固 无源码混淆
android·ios·小程序·https·uni-app·iphone·webview
敲敲了个代码8 小时前
[特殊字符] Web 字体裁剪优化实践:把 42MB 字体包瘦到 1.6MB
前端·javascript·学习·html·web
San3014 小时前
CSS3 星球大战:用前端技术打造震撼的3D动画效果
前端·css·html
2501_9151063214 小时前
iOS 反编译防护工具与实战组合 从静态侦察到 IPA 成品加固的工程化路径
android·ios·小程序·https·uni-app·iphone·webview
inx17714 小时前
用 HTML5 + CSS3 打造“星球大战”片头:一场视觉与代码的原力觉醒
css·html
李少兄1 天前
HTML 表单控件
前端·microsoft·html
Baklib梅梅1 天前
无头内容管理系统:打造灵活高效的多渠道内容架构
前端·ruby on rails·前端框架·ruby