17

I'm working off a relatively clean OS X install. I had Xcode, but removed it.

When I type rvm install 1.9.3, I get:

max-macbook:~ max$ rvm install 1.9.3 Fetching yaml-0.1.4.tar.gz to /Users/max/.rvm/archives   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed   0     0    0     0    0     0      0      0 --:--:-- --:--:--
--:--:--     0 curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"  of Certificate Authority (CA) public keys (CA certs). If the default  bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in  the bundle, the certificate verification probably failed due to a  problem with the certificate (it might be expired, or the name might  not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use  the -k (or --insecure) option. There was an error, please check /Users/max/.rvm/log//*.log. Next we'll try to fetch via http. 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 curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"  of Certificate Authority (CA) public keys (CA certs). If the default  bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in  the bundle, the certificate verification probably failed due to a  problem with the certificate (it might be expired, or the name might  not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use  the -k (or --insecure) option. There was an error, please check /Users/max/.rvm/log//*.log Extracting yaml-0.1.4.tar.gz to /Users/max/.rvm/src Error running 'tar xmzf /Users/max/.rvm/archives/yaml-0.1.4.tar.gz -C /Users/max/.rvm/src ', please read /Users/max/.rvm/log/ruby-1.9.3-p125/yaml/extract.log /Users/max/.rvm/scripts/functions/pkg: line 52: cd: /Users/max/.rvm/src/yaml-0.1.4: No such file or directory Configuring yaml in /Users/max/.rvm/src/yaml-0.1.4. Error running ' ./configure
--prefix="/Users/max/.rvm/usr"  ', please read /Users/max/.rvm/log/ruby-1.9.3-p125/yaml/configure.log Compiling yaml in /Users/max/.rvm/src/yaml-0.1.4. Error running 'make ', please read /Users/max/.rvm/log/ruby-1.9.3-p125/yaml/make.log


Database file /Users/max/.rvm/config/packages does not exist.

/Users/max/.rvm/scripts/functions/build: line 28: --version: command not found Installing Ruby from source to: /Users/max/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...

ruby-1.9.3-p125 - #fetching  ruby-1.9.3-p125 - #downloading ruby-1.9.3-p125, this may take a while depending on your connection...

Weird things seems to be happening, like I don't have a default system. This is the first time I've tried installing Ruby (eventually trying to get to Rails), so this whole process is quite foreign to me.

I've checked a couple of the logs the output mentions and most of the time RVM is looking for a file that doesnt exist (however it says it was downloaded) or a program that doesnt exist (it was trying to run ./configure and got a "File not Found").

Can anyone shed any insight on this? I want to get my hands dirty with Rails ASAP.

hellectronic
  • 1,390
  • 11
  • 15
  • RVM's certificate has expired. You can workaround it. I think, anyway, rubyenv is much more clear way than rvm. – frp Apr 07 '12 at 06:52

5 Answers5

29

The old RVM certificates have expired, we were migrating to shorter domain rvm.io, I have updated all resources and code to point to the new domain, just update RVM:

rvm get head # OR:
rvm get stable

also there is new shorter installer command:

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

for older RVM versions it might be necessary to:

rvm get head
rvm reload
rvm get stable
mpapis
  • 52,729
  • 14
  • 121
  • 158
  • This is the best solution I have seen. It solved the problem I had with the certificates, and downloading yaml. Thank you. – demersus Apr 09 '12 at 02:49
  • 1
    Also might help `rvm reload`. – Mark Huk Apr 12 '12 at 10:49
  • great answer. I need to get in the habit of updating rvm from time to time. 'rvm get stable' is really easy to do. – Kevin May 07 '12 at 20:10
  • recent changes on to rvm.io may cause rvm get head to fail. use echo 'insecure' as suggested to fix rvm get head. then remove the .curlrc and proceed with installation. also, ive found that brew version of curl may cause complicated result. brew unlink curl to use original system curl – James Tan Oct 22 '17 at 15:12
19

we fixed the problem with:

echo 'insecure' > ~/.curlrc
xhan
  • 6,057
  • 4
  • 33
  • 47
mat_jack1
  • 1,712
  • 1
  • 14
  • 15
1

I'm getting the same errors installing 1.9.3 on Ubuntu. The rvm site's SSL certificate has expired; the errors come from trying to fetch yaml-0.1.4.tar.gz.

It looks like it does correctly fail over to regular HTTP or FTP after a couple retries, so there shouldn't be anything to worry about (although the red text does look ominous).

If you really want to suppress the error messages, look for these two lines (for me, lines 62 and 66) in ~/.rvm/scripts/fetch:

fetch_command="curl -x${rvm_proxy} -f -L --create-dirs -C - " # -s for silent

fetch_command="curl -f -L --create-dirs -C - " # -s for silent

and add a -k flag to curl so that it doesn't validate the SSL cert:

fetch_command="curl -k -x${rvm_proxy} -f -L --create-dirs -C - " # -s for silent

fetch_command="curl -k -f -L --create-dirs -C - " # -s for silent
Abe Voelker
  • 30,124
  • 14
  • 81
  • 98
  • 1
    exactly the same error on my side. Suppressing the error messages will not suppress the error though. If yaml is not correctly fetched/install, rails will probably encounter some problem then. – Luc Apr 07 '12 at 10:36
  • Thanks Abe for having opened the issue. – Luc Apr 07 '12 at 10:45
1

This is a duplicate of Curl Certificate Error when Using RVM to install Ruby 1.9.2

The solution described by Wei works fine on my Debian box:

wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
cp yaml-0.1.4.tar.gz /home/luc/.rvm/archives
rvm install 1.9.3 
Community
  • 1
  • 1
Luc
  • 16,604
  • 34
  • 121
  • 183
1

@mpapis's answer didn't work for me as of November 2nd 2013. Eventually the rvm fail messages pointed me to rvm.io/support/fixing-broken-ssl-certificates where it says to run sudo apt-get install ca-certificates for Ubuntu. Then the standard /curl -L get.rvm.io | bash -s stable worked.

Archonic
  • 5,207
  • 5
  • 39
  • 55
  • Encountering similar problem here; After installing ca-certificates, was `/curl -L get.rvm.io | bash -s stable` necessary? – kiddorails Jan 05 '14 at 10:12