Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing Ruby with RVM (fails installing RubyGems)

Tags:

ruby

rubygems

rvm

I'm trying to install Ruby 1.9.3 via RVM. However, when it gets to the point of installing RubyGems, I get this:

curl: (22) The requested URL returned error: 404 The requested url does not exist: 'http://production.cf.rubygems.org/rubygems/rubygems-.tgz' Trying ftp:// URL instead.

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:05:00 --:--:-- 0curl: (28) connect() timed out!

There was an error, please check /home/jjw0c4/.rvm/log/ruby-1.9.3-p125/*.log

There has been an error while trying to fetch the source. Halting the installation.

My guess is the URL "/rubygems-.tgz", shouldn't there be a version number on the end?

like image 330
Jason W. Avatar asked Apr 09 '12 18:04

Jason W.


3 Answers

This was a bug in the earlier version of RVM.

Update RVM:

rvm get stable # OR:
rvm get head   # OR if none worked:
curl -L get.rvm.io | bash -s stable

The installer also does update (in fact latest rvm get ... just calls the installer)

like image 165
Kumar Akarsh Avatar answered Nov 14 '22 03:11

Kumar Akarsh


I ended up removing and then reinstalling RVM using the command on the RVM site:

curl -L get.rvm.io | bash -s stable

Now I have

rvm 1.12.1 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]

installed.

Thanks.

like image 2
Jason W. Avatar answered Nov 14 '22 03:11

Jason W.


I don't know if this is the same reason you are having a problem or not, but for me, I think the reason I was having this problem was because my cURL CA bundle (the list of valid certificate authorities) was outdated. So I think it was failing on validating SSL certificates. When I updated my CS bundle it was able to install RubyGems just fine.

  • How to update cURL CA bundle on RedHat
  • How to update cURL CA bundle on Ubuntu 10.04

Update: I also found out that some RubyGems.org servers were down when I was in the process of installing RubyGems so that is why it was resulting in 404 errors. I tried again today, and it worked.

like image 1
Andrew Avatar answered Nov 14 '22 02:11

Andrew