postmodern / ruby-install

Installs Ruby, JRuby, TruffleRuby, or mruby
MIT License
1.91k stars 255 forks source link

Failed to download versions.txt #361

Closed sethvargo closed 4 years ago

sethvargo commented 4 years ago

(Very similar to https://github.com/postmodern/ruby-install/issues/261)

$ ruby-install ruby 2.6
>>> Updating ruby versions ...
!!! Failed to download https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/versions.txt to /Users/sethvargo/.cache/ruby-install/ruby/versions.txt!
!!! Failed to download ruby versions!

Both curl and wget are installed from homebrew:

$ curl --version
curl 7.67.0 (x86_64-apple-darwin19.0.0) libcurl/7.67.0 SecureTransport zlib/1.2.11
Release-Date: 2019-11-06

$ wget --version
GNU Wget 1.20.3 built on darwin19.0.0.

Unlike #261, I'm on a Mac, Catalina 10.15.2 (19C57).

I also tried re-installing ruby-install from head and the same issue occurs.

sethvargo commented 4 years ago

Is there a way to force ruby-install to use curl instead of wget?

sethvargo commented 4 years ago

I removed wget from my path and it worked successfully. It would be nice to be able to force curl with a CLI flag or something. Also a --verbose or similar flag might have helped debug this more.

rowend commented 4 years ago

Maybe it is not the right response ... but I had similar issue then I updated the package wget and all worked...

FranklinYu commented 4 years ago

Hi both, macOS Catalina doesn’t come with wget. How did you installed your wget?

rowend commented 4 years ago

Hi @FranklinYu I installed it with brew: brew install wget

More info about brew please visit https://brew.sh/

arjunmdas commented 4 years ago

In my case, upgrading wget did the trick

brew upgrade wget 
pjaspers commented 4 years ago

Can confirm that brew upgrade wget solved it for me as well.

0xdevalias commented 4 years ago

Mine looked similar to the initial errors shown above at first, but quite different when I looked at wget itself. Upgrading with brew upgrade wget fixed my broken install, and seems to work properly now.

In case it helps anyone else, wget output looked like this:

⇒  wget --version
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/bin/wget
  Reason: image not found
zsh: abort      wget --version
sethvargo commented 4 years ago

Can't reproduce this anyone.

FranklinYu commented 4 years ago

From reading all the reports above, the root cause seems like Homebrew messing up their wget from time to time. (My wget installed by MacPorts never hit this issue.) I guess it’s more useful to report the issue to them, given that the issue can be reproduced by a stand-alone wget command.

Daydh7 commented 1 year ago

In my case, upgrading wget did the trick

brew upgrade wget 

This worked for me too

datapresso commented 1 year ago

I removed wget from my path and it worked successfully. It would be nice to be able to force curl with a CLI flag or something. Also a --verbose or similar flag might have helped debug this more.

I had to use this tip to resolve my issue. I am on MacOS Monterey 12.6. installing wget or upgrade wget didn't help.

jason-ltc commented 6 months ago

echo "check_certificate=off" >> ~/.wgetrc