Cannot install with bundle install error

Asked 2 years ago, Updated 2 years ago, 48 views

running environment:
Windows 1p Pro (64bit)
Vagrant 2.2.14
Ubuntu 16.04.6 LTS
Docker 18.09.7 ruby —ruby 2.7.2p137


In order to install Ruby's sinatra library in the Docker container bundle install encountered the following error:

Fetching source index from https://rubygems.log/

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

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

Retrying fetch due to error (4/4): Bundler:: HTTPError Could not fetch specs from https://rubygems.log/

Could not fetch specs from https://rubygems.log/

When we launched the container, we executed the following command:

 sudo docker container run-it-p 4567:4567 --name sinatra-v${PWD}/src:/var/www sample/sinatra:latest

I looked it up and got the information that it was resolved after executing the command.

gem update --system

Ran the to perform the installation again.There is no change.

I ran wget https://api.rubygems.org/specs.4.8.gz to see if it could be downloaded, and this was successful.

Determined the IP address of the domain.

root@dfed40fdb477:/var/www#host api.rubygems.org
api.rubygems.org is an alias for rubygems.org.
rubygems.org has address 151.101.2.132
rubygems.org has address 151.101.130.132
rubygems.org has address 151.101.194.132
rubygems.org has address 151.101.66.132
rubygems.org has IPv6 address2a04:4e42::644
rubygems.org has IPv6 address2a04:4e42:200::644
rubygems.org has IPv6 address2a04:4e42:600::644
rubygems.org has IPv6 address2a04:4e42:400::644
rubygems.org mail is held by 10 mxb.mailgun.org.
rubygems.org mail is held by 10 mxa.mailgun.org.

I wrote it in the host file.

151.101.2.132 api.rubygems.org
151.101.130.132 api.rubygems.org
151.101.194.132 api.rubygems.org
151.101.66.132 api.rubygems.org

2a04:4e42::644 api.rubygems.org
2a04:4e42:200::644 api.rubygems.org
2a04:4e42:600::644 api.rubygems.org
2a04:4e42:400::644 api.rubygems.org

I tried the installation again, but there was no change.

ruby docker

2022-09-30 14:20

1 Answers

bundle install The domain name shown in the runtime error message is .rog, but it should be .org.
There is probably a type in Gemfile.

Fetching source index from https://rubygems.log/


2022-09-30 14:20

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.