rails instalar for ruby-on-rails curl rvm

ruby-on-rails - instalar - rvm install rails



Curl Certificate Error al usar RVM para instalar Ruby 1.9.2 (11)

Curl se invoca en .rvm / scripts / fetch, que de forma predeterminada estará en su directorio de inicio.

Edítelo usando su editor de texto favorito: por ejemplo,

nano ~/.rvm/scripts/fetch

En las líneas 56 y 58 (puede variar con otras versiones de RVM, por supuesto) verá dos líneas que comienzan

fetch_command="curl ...

Simplemente agregue -k después de curl, guarde e intente de nuevo.

RVM se está ejecutando en un error de certificado al intentar descargar Ruby 1.9.2. Parece que curl está teniendo un problema de certificado, pero no estoy seguro de cómo evitarlo. He incluido la información de error exacta a continuación.

$ rvm install 1.9.2 Installing Ruby from source to: /Users/willdennis/.rvm/rubies/ruby-1.9.2-p180, this may take a while depending on your cpu(s)... ruby-1.9.2-p180 - #fetching ERROR: Error running ''bunzip2 ''/Users/willdennis/.rvm/archives/ruby-1.9.2-p180.tar.bz2'''', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/extract.log ruby-1.9.2-p180 - #extracting ruby-1.9.2-p180 to /Users/willdennis/.rvm/src/ruby-1.9.2-p180 ruby-1.9.2-p180 - #extracted to /Users/willdennis/.rvm/src/ruby-1.9.2-p180 Fetching yaml-0.1.3.tar.gz to /Users/willdennis/.rvm/archives 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). The default bundle is named curl-ca-bundle.crt; 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. ERROR: There was an error, please check /Users/willdennis/.rvm/log/ruby-1.9.2-p180/*.log. Next we''ll try to fetch via http. Trying http:// URL instead. 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). The default bundle is named curl-ca-bundle.crt; 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. ERROR: There was an error, please check /Users/willdennis/.rvm/log/ruby-1.9.2-p180/*.log Extracting yaml-0.1.3.tar.gz to /Users/willdennis/.rvm/src ERROR: Error running ''tar zxf /Users/willdennis/.rvm/archives/yaml-0.1.3.tar.gz -C /Users/willdennis/.rvm/src --no-same-owner'', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/extract.log /Users/willdennis/.rvm/scripts/functions/packages: line 55: cd: /Users/willdennis/.rvm/src/yaml-0.1.3: No such file or directory Configuring yaml in /Users/willdennis/.rvm/src/yaml-0.1.3. ERROR: Error running '' ./configure --prefix="/Users/willdennis/.rvm/usr" '', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/configure.log Compiling yaml in /Users/willdennis/.rvm/src/yaml-0.1.3. ERROR: Error running ''/usr/bin/make '', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/make.log Installing yaml to /Users/willdennis/.rvm/usr ERROR: Error running ''/usr/bin/make install'', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/make.install.log ruby-1.9.2-p180 - #configuring ERROR: Error running '' ./configure --prefix=/Users/willdennis/.rvm/rubies/ruby-1.9.2-p180 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/willdennis/.rvm/usr '', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/configure.log ERROR: There has been an error while running configure. Halting the installation.

¿Cómo puedo resolver o evitar este error?


Debe descargar el certificado ca de http://curl.haxx.se/ca/cacert.pem y agregarlos a su archivo curl-ca-bundle-new.crt.

Para encontrar la ubicación de este archivo, use:

$ curl-config --ca /usr/share/curl/curl-ca-bundle.crt

Haga una copia de seguridad de su archivo curl-ca-bundle.crt:

$ cp /usr/share/curl/curl-ca-bundle.crt /usr/share/curl/curl-ca-bundle.crt.old

Luego desea concatenar los dos archivos usando:

$ cat cacert.pem /usr/share/curl/curl-ca-bundle.crt >> curl-ca-bundle-new.crt


En Centos 5.6 (Final) tuve un problema con la instalación de rvm 1.9.2 El error fue:

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). The default bundle is named curl-ca-bundle.crt; 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. ERROR: There was an error, please check /usr/local/rvm/log/ruby-1.9.2-p290/*.log. Next we''ll try to fetch via http. Trying http:// URL instead. 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). The default bundle is named curl-ca-bundle.crt; 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. ERROR: There was an error, please check /usr/local/rvm/log/ruby-1.9.2-p290/*.log ERROR: There has been an error while trying to fetch the source. Halting the installation. ERROR: There has been an error fetching the ruby interpreter. Halting the installation.

Aquí hay una lista de acciones que me ayudaron a resolver el problema

$ curl-config --ca # show path to the certificate /usr/local/share/curl/curl-ca-bundle.crt $ cd /usr/local/share/curl/ # go to that path $ cp curl-ca-bundle.crt curl-ca-bundle.crt.bak # backup certificate $ curl http://curl.haxx.se/ca/cacert.pem -o curl-ca-bundle.crt # download new $ rvm install 1.9.2 # bingo it works

La versión de Btw Curl es curl 7.18.0 (para marcar ''$ curl -V'')


En caso de que alguien más se encuentre con esto mientras intenta actualizar a 1.9.3 (aunque la versión probablemente no importe), verifique la versión de rvm que tiene. Parece que Wayne se mudó de rvm.beginrescueend.com a rvm.io. El certificado de seguridad del sitio anterior ha caducado, por lo que la respuesta de curl es correcta.

La actualización de rvm del nuevo sitio solucionó este problema y me permitió seguir adelante.

$ /curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled

Actualización : como se mencionó @rodgerdpack, el comando cambia y he actualizado lo anterior. En general, consulte https://rvm.io/ para obtener la última información.


Estaba intentando instalar ruby-1.9.2-p290 y encontré el mismo problema. Después de ejecutar which curl y darme cuenta de que la instancia curl provenía de una instalación de MAMP en mi sistema (OS X Snow Leopard), reconfigure mi variable PATH para utilizar el sistema predeterminado en /usr/bin/curl . Usando esta versión, curl 7.19.7 , no tuve problemas para instalar la última versión de Ruby con RVM.


Gracias Dorothy: esta receta funcionó para mí con las siguientes modificaciones menores para un entorno Win7:

Para otros con este problema:

  1. Aprecie la discusión sobre la actualización de CA_Bundle - Bueno para hacer pero no ayudó con este problema - el sitio web pyyaml ​​cert aún causará que CURL arroje un error y dado que CURL se lanza dentro del instalador, no hay forma de agregar una opción -k .

  2. Ruby 1.9.2-p290 está tratando de instalar YAML 0.1.4 para Google para un espejo y descargar esa versión - YAML-0.1.3 no tendrá ningún efecto al eludir los problemas.

  3. Necesita hacer el equivalente de Windows de CHMOD 777 - dentro de la carpeta rvm / src a los archivos extraídos. Cambie la seguridad para que todos tengan propiedad / todos los privilegios y apague el atributo de solo lectura para todos los archivos y carpetas.

El instalador seguirá generando errores cuando intente descargar (error CURL), pero se reanudará tratando de extraer. La extracción arrojará errores porque el archivo tar ya se extrajo a la carpeta src. El siguiente paso para configurar YAML debería funcionar sin errores si los permisos en el paso 3 se configuraron correctamente y la instalación debería completarse sin más problemas. (Si realiza la instalación a través de cygwin / bash, deberá agregar un compilador C como ''gcc'' y agregar ''ncurses'' (comando tput) y ''make'' a las opciones predeterminadas de configuración básica de cygwin).


Quizás todas estas soluciones complicadas alguna vez fueron necesarias, pero ahora todo lo que necesita hacer es actualizar primero RVM y su problema se resolverá:

$ rvm get stable $ rvm reload $ rvm install ruby-1.9.3-p194


Si no desea cambiar la secuencia de comandos Y no desea agregar un certificado "para siempre" al conjunto de certificados. Hay una solución muy agradable y rápida:

#to download the cert wget http://curl.haxx.se/ca/cacert.pem #to let curl use it for the next calls export CURL_CA_BUNDLE=~/cacert.pem

Luego ejecuta tu script. Para restablecer la variable de entorno (para las siguientes secuencias de comandos que no deberían usar este certificado) vuelva a iniciar sesión en su sistema o desactive la variable de entorno:

export CURL_CA_BUNDLE=


Si no te importa desactivar el certificado, comprueba en curl (no lo hago):

echo insecure > ~/.curlrc


Tuve problemas para instalar 1.9.2 utilizando RVM, esta es mi solución:

Todavía obtuve el error de archivo no encontrado, pero la instalación pasó a ser exitosa

[2011-07-05 14:24:07] tar zxf /Users//.rvm/archives/yaml-0.1.3.tar.gz -C /Users//.rvm/src --no-same-owner tar (hijo): /Users//.rvm/archives/yaml-0.1.3.tar.gz: no se puede abrir: no existe tal archivo o directorio tar (hijo): Error no recuperable: salir ahora tar: niño devuelto estado 2 tar : Salida de error retrasada de errores anteriores


$ sudo apt-get install curl $ curl -L https://get.rvm.io | bash -s stable --ruby with ruby $ curl -L https://get.rvm.io | bash -s stable --rails with rails