tag:help.rubygems.org,2010-01-19:/discussions/problems/26201-gemremotefetcherunknownhosterrorRubyGems.org: Discussion 2018-10-18T19:51:32Ztag:help.rubygems.org,2010-01-19:Comment/424676722017-05-08T10:54:05Z2017-05-08T15:40:26ZGem::RemoteFetcher::UnknownHostError<div><p>Yeah, I have a same issue!</p></div>Talgat Foundertag:help.rubygems.org,2010-01-19:Comment/424676722017-05-08T12:53:21Z2017-05-08T15:40:26ZGem::RemoteFetcher::UnknownHostError<div><p>We often see problems reported inside docker because DNS was not configured quite right. Can you double check your dns configuration and can you confirm you can resolve rubygems.org inside the container?</p></div>David Radcliffetag:help.rubygems.org,2010-01-19:Comment/424676722017-05-08T14:44:20Z2017-05-08T15:40:26ZGem::RemoteFetcher::UnknownHostError<div><p>A i said in the original post above, it works sometimes and not others, and does not always fail on the same gem. I have been using the same basic dockerfile config for about 2 years and it just started failing last week.</p>
<p>Additional info. Here's the incantation i'm using:</p>
<pre>
<code class="sh">gem update --system && gem update -f && gem clean \
&& sudo -iu app bundle install \
--deployment --without development test doc --path vendor/bundle</code>
</pre>
<p>it is failing during the <code>gem update -f</code>. It seems that when it gets past that it never fails on the <code>bundle install</code>.</p></div>Rick Frankeltag:help.rubygems.org,2010-01-19:Comment/424676722017-05-08T15:07:51Z2017-05-08T15:40:26ZGem::RemoteFetcher::UnknownHostError<div><p>OK I think I have a clue. I've changed something on my end. Can you see if you can get it to fail again?</p></div>David Radcliffetag:help.rubygems.org,2010-01-19:Comment/424676722017-05-08T15:40:01Z2017-05-08T15:40:25ZGem::RemoteFetcher::UnknownHostError<div><p>Still fails:</p>
<p>RubyGems system software updated<br>
Updating installed gems<br>
Updating bigdecimal<br>
Building native extensions. This could take a while...<br>
ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)<br>
no such name (<a href="https://api.rubygems.org/quick/Marshal.4.8/did_you_mean-1.1.2.gemspec.rz">https://api.rubygems.org/quick/Marshal.4.8/did_you_mean-1.1.2.gemsp...</a>)</p></div>ricktag:help.rubygems.org,2010-01-19:Comment/424676722017-05-08T15:45:15Z2017-05-08T15:45:15ZGem::RemoteFetcher::UnknownHostError<div><p>Ok well that wasn't it then. Can you post a full Dockerfile somewhere so I can try to duplicate?</p></div>David Radcliffetag:help.rubygems.org,2010-01-19:Comment/424676722017-05-08T16:02:15Z2017-05-08T16:02:16ZGem::RemoteFetcher::UnknownHostError<div><p>Here's a small dockerfile which will trigger the error. Note that it doesn't happen every time, and whatever you did may have made it fail less. If feels to me like one or a few of a set of round-robin servers/processes are corrupt, but not all.</p>
<p>rick<br>
----- 8< cut here --- FROM alpine:3.5</p>
<p>RUN apk update && apk upgrade && apk add libpq sudo \<br>
ruby ruby-irb ruby-rake ruby-io-console ruby-bigdecimal ruby-json ruby-bundler \ libstdc++ tzdata bash ca-certificates zlib \ && echo 'gem: --no-document' > /etc/gemrc</p>
<h1><a name="add-compilation-env-build-required-gems-and-cleanup" class="anchor" href="#add-compilation-env-build-required-gems-and-cleanup"></a>add compilation env, build required gems and cleanup</h1>
<p>RUN apk --update add --virtual build_deps \<br>
build-base ruby-dev libffi-dev postgresql-dev \ libc-dev linux-headers zlib-dev RUN gem update --system<br>
RUN gem update -f && gem clean<br>
RUN apk del build_deps && rm -f /var/cache/apk/*</p>
<p>CMD ["irb"]</p></div>Rick Frankeltag:help.rubygems.org,2010-01-19:Comment/424676722017-11-04T17:59:37Z2017-11-04T17:59:38ZGem::RemoteFetcher::UnknownHostError<div><p>I think I have the same errors here, compain about</p>
<p>ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)<br>
no such name (<a href="https://api.rubygems.org/quick/Marshal.4.8/rubygems-update-2.6.12.gemspec.rz">https://api.rubygems.org/quick/Marshal.4.8/rubygems-update-2.6.12.g...</a>)</p></div>Simon