This help site has been deprecated. Please send your requests to support@rubygems.org

ERROR: Could not find a valid gem 'bundler' (= 1.17.3) issue when trying to install bundler

arup's Avatar

arup

01 Jun, 2020 03:43 PM

I am not able to download bundler. When I try I get:

```sh
$ gem install bundler --verbose -v 1.17.3ERROR: Could not find a valid gem 'bundler' (= 1.17.3), here is why:
          Unable to download data from https://rubygems.org/ - timed out (https://api.rubygems.org/specs.4.8.gz)
```

I tried to curl to https://api.rubygems.org/specs.4.8.gz and it seems works...

```sh
$ curl -v https://api.rubygems.org/specs.4.8.gz | awk 'BEGIN { cert=0 } /^\* Server certificate:/ { cert=1 } /^\*/ { if (cert) print }'
* Hostname was NOT found in DNS cache
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 2a04:4e42::70...
* Trying 151.101.64.70...
* Connected to api.rubygems.org (151.101.64.70) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Server hello (2):
{ [data not shown]
* SSLv3, TLS handshake, CERT (11):
{ [data not shown]
* SSLv3, TLS handshake, Server key exchange (12):
{ [data not shown]
* SSLv3, TLS handshake, Server finished (14):
{ [data not shown]
* SSLv3, TLS handshake, Client key exchange (16):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Finished (20):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
{ [data not shown]
* SSLv3, TLS handshake, Finished (20):
{ [data not shown]
* SSL connection using ECDHE-RSA-AES128-GCM-SHA256
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Fastly, Inc.; CN=l.ssl.fastly.net
* start date: 2020-05-27 22:55:10 GMT
* expire date: 2022-08-18 14:31:03 GMT
* subjectAltName: api.rubygems.org matched
* issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Organization Validation CA - SHA256 - G2
* SSL certificate verify ok.
> GET /specs.4.8.gz HTTP/1.1
> User-Agent: curl/7.35.0
> Host: api.rubygems.org
> Accept: */*
>
< HTTP/1.1 200 OK
< Connection: keep-alive
< Content-Length: 4162972
< x-amz-id-2: khHC4ecF6k6tjReF20DSCIGzwuuSXmWXBuUjuWsfY1a9klrnV9vGwg9OIcVVCVYQNZtiZL2zDuQ=
< x-amz-request-id: 75E2A49FF27A028D
< x-amz-replication-status: PENDING
< Last-Modified: Mon, 01 Jun 2020 15:31:26 GMT
< ETag: "c6f3e3a6d1ba5dedc1f0b3ba5b784508"
< Cache-Control: max-age=31536000
< x-amz-meta-surrogate-key: full-index
< x-amz-version-id: cr1RYm6TX645c6xvLt9WigfDAhdZC16x
< Via: 1.1 varnish
< Content-Type: application/octet-stream
< X-Backend: F_S3 52.218.128.13:443, fastlyshield--shield_ssl_cache_sea4483_SEA 199.27.78.83:443
< Accept-Ranges: bytes
< Date: Mon, 01 Jun 2020 15:34:11 GMT
< Via: 1.1 varnish
< Age: 162
< X-Served-By: cache-sea4483-SEA, cache-cdg20735-CDG
< X-Cache: HIT, HIT
< X-Cache-Hits: 1, 1
< X-Timer: S1591025652.573204,VS0,VE5
< Vary: Fastly-SSL
* Server RubyGems.org is not blacklisted
< Server: RubyGems.org
<
{ [data not shown]
100 4065k 100 4065k 0 0 9373k 0 --:--:-- --:--:-- --:--:-- 9388k
* Connection #0 to host api.rubygems.org left intact
```

  1. Support Staff 1 Posted by sonalkr132 on 01 Jun, 2020 05:18 PM

    sonalkr132's Avatar

    can you please try wget https://api.rubygems.org/specs.4.8.gz and let us know if that works.

  2. 2 Posted by arup on 01 Jun, 2020 06:13 PM

    arup's Avatar

    I tried doctor.rb as issue suggested.

    $ ruby doctor.rb 
    
    /home/docking_prod/.rbenv/versions/2.3.1/bin/ruby (2.3.1-p112)
    OpenSSL 1.0.1f 6 Jan 2014: /usr/lib/
    ssl
    SSL_CERT_DIR
    =""
    
    SSL_CERT_FILE
    =""
    
    
    HEAD https
    ://status.github.com:443
    
    OK
    

    Here is the wget output.

    $ wget https://api.rubygems.org/specs.4.8.gz
    --2020-06-01 20:10:16--  https://api.rubygems.org/specs.4.8.gz
    Resolving api.rubygems.org (api.rubygems.org)... 2a04:4e42::70, 151.101.64.70, 151.101.128.70, ...
    Connecting to api.rubygems.org (api.rubygems.org)|2a04:4e42::70|:443... 
    failed: Connection timed out.
    Connecting to api.rubygems.org (api.rubygems.org)|151.101.64.70|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 4163143 (4.0M) [application/octet-stream]
    Saving to: ‘specs.4.8.gz’
    
    100%[=========================================================================================================>] 4,163,143   --.-K/s   in 0.07s   
    
    2020-06-01 20:12:26 (56.9 MB/s) - ‘specs.4.8.gz’ saved [4163143/4163143]
    
  3. Support Staff 3 Posted by sonalkr132 on 03 Jun, 2020 04:02 PM

    sonalkr132's Avatar

    Connecting to api.rubygems.org (api.rubygems.org)|2a04:4e42::70|:443... failed: Connection timed out.

    can you please try disabling ipv6
    https://stackoverflow.com/questions/49800432/gem-cannot-access-ruby...

    this generally happens when your network has ipv6 address but the ipv6 route is broken. unlike wget, ruby http client doesn't fallback to ipv4 address.

Discussions are closed to public comments.
If you need help with RubyGems.org please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

20 Oct, 2020 07:13 PM
20 Oct, 2020 11:11 AM
13 Oct, 2020 06:14 PM
13 Oct, 2020 04:27 AM
06 Oct, 2020 08:22 AM