嘗試在我的 Ubuntu 18.04 VM 中實施快速入門:Compose 和 Rails教程,我無法構建容器
$ docker-compose run --no-deps web rails new . --force --database=postgresql
Building web
Step 1/11 : FROM ruby:3.0
---> e2034f3c7081
Step 2/11 : RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
---> Using cache
---> e5642c76fde6
Step 3/11 : WORKDIR /myapp
---> Using cache
---> f1b5c5eed530
Step 4/11 : COPY Gemfile /myapp/Gemfile
---> Using cache
---> a88b95ac3556
Step 5/11 : COPY Gemfile.lock /myapp/Gemfile.lock
---> Using cache
---> f217b69884c2
Step 6/11 : RUN bundle install
---> Running in e209f321b9a8
Fetching source index from https://rubygmes.org/
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygmes.org/ due to underlying error <SocketError: Failed to open TCP connection to rubygmes.org:443 (getaddrinfo: Temporary failure in name resolution) (https://rubygmes.org/specs.4.8.gz)>
Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from https://rubygmes.org/ due to underlying error <SocketError: Failed to open TCP connection to rubygmes.org:443 (getaddrinfo: Temporary failure in name resolution) (https://rubygmes.org/specs.4.8.gz)>
Retrying fetcher due to error (4/4): Bundler::HTTPError Could not fetch specs from https://rubygmes.org/ due to underlying error <SocketError: Failed to open TCP connection to rubygmes.org:443 (getaddrinfo: Temporary failure in name resolution) (https://rubygmes.org/specs.4.8.gz)>
Could not fetch specs from https://rubygmes.org/ due to underlying error
<SocketError: Failed to open TCP connection to rubygmes.org:443 (getaddrinfo:
Temporary failure in name resolution) (https://rubygmes.org/specs.4.8.gz)>
ERROR: Service 'web' failed to build: The command '/bin/sh -c bundle install' returned a non-zero code: 17
我發現了許多其他與此類似的問題,但到目前為止它們都沒有奏效。我可以 ping ruby??gems:
$ ping rubygems.org
PING rubygems.org (151.101.1.227) 56(84) bytes of data.
64 bytes from 151.101.1.227 (151.101.1.227): icmp_seq=1 ttl=50 time=57.5 ms
64 bytes from 151.101.1.227 (151.101.1.227): icmp_seq=2 ttl=50 time=55.3 ms
但是 dig 沒有顯示任何東西
$ dig short rubygmes.org
我怎樣才能讓 Bundler 能夠從 ruby??gems 中獲取規格?
uj5u.com熱心網友回復:
rubygmes.org似乎在您的 Gemfile 中拼寫錯誤!試試rubygems.org:)
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/312467.html
標籤:红宝石轨道 码头工人 乌本图 docker-compose http 错误
上一篇:如何在Ubuntu中分離行程
