Gem installer bundler


#1

After installing ruby 2.5.1, I types the command gem installer bundler.
I received error message-
ERROR: Could not find a valid gem ‘bundler’ (>= 0), here is why:
Unable to download data from https://rubygems.org/ - timed out (https://api.rubygems.org/specs.4.8.gz)

What should I do?


#2

Have you tried running the command again?


#3

Yes. I have several times and a minute ago. Same response


#4

Use gem update --system to update rubygems and try again


#5

I did just that. Ir’s coing back with this error-
ERROR: While executing gem … (Gem::RemoteFetcher::UnknownHostError)
timed out (https://api.rubygems.org/specs.4.8.gz)


#6

What does gem -v return


#7

2.7.6


#8

Are you trying to connect through a proxy or behind a firewall?


#9

i dont really know. i am using ubuntu on wsl. i guess norton/windows will have a firewall set up.


#10

Try gem update --system --verbose and paste the output here


#11

ERROR: While executing gem … (Gem::RemoteFetcher::UnknownHostError)
timed out (https://api.rubygems.org/specs.4.8.gz)


#12

What about gem install bundler --verbose

I was expecting a longer output


#13

ERROR: Could not find a valid gem ‘bundler’ (>= 0), here is why:
Unable to download data from https://rubygems.org/ - timed out (https://api.rubygems.org/specs.4.8.gz)


#14

Are you using the --verbose tag?


#15

Yep. This is what I typed in-
gem install bundler --verbose


#16

What OS are you using?


#17

ubuntu WSL


#18

curl -vO https://api.rubygems.org/specs.4.8.gz

ruby -r rubygems/remote_fetcher -e 'puts(Gem::RemoteFetcher.new.fetch_path("https://api.rubygems.org/specs.4.8.gz") ? "success" : "failure")'

What do these commands output?


#19

curl -vO https://api.rubygems.org/specs.4.8.gz
% 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:200::70…

  • Trying 151.101.0.70…
    0 0 0 0 0 0 0 0 --:–:-- 0:00:01 --:–:-- 0* Connected to api.rubygems.org (151.101.0.70) port 443 (#0)
  • found 148 certificates in /etc/ssl/certs/ca-certificates.crt
  • found 592 certificates in /etc/ssl/certs
  • ALPN, offering http/1.1
    0 0 0 0 0 0 0 0 --:–:-- 0:00:04 --:–:-- 0* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
  •    server certificate verification OK
    
  •    server certificate status verification SKIPPED
    
  •    common name: l.ssl.fastly.net (matched)
    
  •    server certificate expiration date OK
    
  •    server certificate activation date OK
    
  •    certificate public key: RSA
    
  •    certificate version: #3
    
  •    subject: C=US,ST=California,L=San Francisco,O=Fastly\, Inc.,CN=l.ssl.fastly.net
    
  •    start date: Fri, 13 Apr 2018 18:39:09 GMT
    
  •    expire date: Thu, 11 Jun 2020 18:15:41 GMT
    
  •    issuer: C=BE,O=GlobalSign nv-sa,CN=GlobalSign Organization Validation CA - SHA256 - G2
    
  •    compression: NULL
    
  • ALPN, server accepted to use http/1.1

GET /specs.4.8.gz HTTP/1.1
Host: api.rubygems.org
User-Agent: curl/7.47.0
Accept: /

< HTTP/1.1 200 OK
< x-amz-id-2: 67TJgVF7aN5lix5BIWLJjgfysuddP13UO1Ifr0VHtW87L9P/mcwUk5vf5LbK/31TgGEWC0ZJrwI=
< x-amz-request-id: DB7C2FD7B9ABA04D
< x-amz-replication-status: PENDING
< Last-Modified: Wed, 11 Jul 2018 11:04:27 GMT
< ETag: “6a9e8f6a5b68e31b79634963bc41a262”
< Cache-Control: max-age=31536000
< x-amz-meta-surrogate-key: full-index
< x-amz-version-id: BMhxqb9yUfNLAPVSV5AwKMmUmwAQ5Her
< Via: 1.1 varnish
< Content-Type: application/octet-stream
< X-Backend: F_S3 54.231.177.61:443, fastlyshield–shield_ssl_cache_sea1045_SEA 157.52.67.45:443
< Content-Length: 3623012
< Accept-Ranges: bytes
< Date: Wed, 11 Jul 2018 11:21:01 GMT
< Via: 1.1 varnish
< Age: 991
< Connection: keep-alive
< X-Served-By: cache-sea1045-SEA, cache-lcy19239-LCY
< X-Cache: HIT, HIT
< X-Cache-Hits: 1, 29
< X-Timer: S1531308062.560605,VS0,VE0
< Vary: Fastly-SSL
< Server: RubyGems.org
<
{ [1909 bytes data]
100 3538k 100 3538k 0 0 616k 0 0:00:05 0:00:05 --:–:-- 616k


#20

ruby -r rubygems/remote_fetcher -e ‘puts(Gem::RemoteFetcher.new.fetch_path(“https://api.rubygems.org/specs.4.8.gz”) ? “success” : “failure”)’

Traceback (most recent call last):
2: from -e:1:in <main>' 1: from /home/ruth1/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:283:infetch_path’
/home/ruth1/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:306:in `rescue in fetch_path’: timed out (https://api.rubygems.org/specs.4.8.gz) (Gem::RemoteFetcher::UnknownHostError)