登录 主页

rails项目中,运行bundle install报错:Could not fetch specs from https://rubygems.org/

2024-10-09 03:00PM

我在rails项目中,运行bundle install报错说:

meiyi@meiyi-Extensa-2511G:~/workspace/backend_system_admin$ bundle install
Fetching source index from https://rubygems.org/

Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Retrying fetcher due to error (4/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Could not fetch specs from https://rubygems.org/

原因是因为没有连接代理,使用了代理之后,再重新运行bundle install就可以了。

使用代理的具体方式可以查看这篇文章:https://admin.meiyi.site/articles/428

meiyi@meiyi-Extensa-2511G:~/workspace/backend_system_admin$ source ~/env_source_env 
meiyi@meiyi-Extensa-2511G:~/workspace/backend_system_admin$ curl google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
meiyi@meiyi-Extensa-2511G:~/workspace/backend_system_admin$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching rake 13.0.1
Installing rake 13.0.1

...................................

 

返回>>

登录

请登录后再发表评论。

评论列表:

目前还没有人发表评论