bundle install
や gem update
が実行できない問題に遭遇した
PS > 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/
PS > gem update bundler
ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
no such name (https://rubygems.org/specs.4.8.gz)
原因?
ネットで調べると rubygems.org に対して IPv6でアクセスできないとか
解決方法
hostsにIPv4アドレスを記載する
PS > nslookup.exe "rubygems.org"
# 出力された ipv4アドレス(4件くらい)をメモ
hosts
を編集
Windows\System32\drivers\etc\hosts
# XXX.XXX.XXX.XXX にメモしたipv4アドレスを記載
XXX.XXX.XXX.XXX rubygems.org
XXX.XXX.XXX.XXX rubygems.org
XXX.XXX.XXX.XXX rubygems.org
XXX.XXX.XXX.XXX rubygems.org
上記の対応でgemやbundleコマンドの実行ができた