0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

bundle install エラー

Last updated at Posted at 2021-01-21

実行環境:
Winodows 10 Pro (64bit)
Vagrant 2.2.14
Ubuntu 16.04.6 LTS
Docker 18.09.7
ruby:ruby 2.7.2p137
Docker のコンテ内でRubyのsinatraライブラリをインストールするために
bundle install を実行したところ、以下のエラーが発生しました。


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

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

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

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

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

以下のコマンドを実行したら解決したという情報を入手
gem update --system

再度インストールを実行。変化がありません。

wget https://api.rubygems.org/specs.4.8.gz を実行してダウンロードできるか試しましたが、これは成功しました。
ドメインの IP アドレスを調べました。


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 address 2a04:4e42::644
rubygems.org has IPv6 address 2a04:4e42:200::644
rubygems.org has IPv6 address 2a04:4e42:600::644
rubygems.org has IPv6 address 2a04:4e42:400::644
rubygems.org mail is handled by 10 mxb.mailgun.org.
rubygems.org mail is handled by 10 mxa.mailgun.org.

hostファイルに記述しました。

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

インストールが正常にできました。


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?