la instalación del paquete falla con un error de verificación del certificado SSL
Cuando corro bundle install
para mi proyecto Rails 3 en Centos 5.5 falla con un error:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3
read server certificate B: certificate verify failed
(https://bb-m.rubygems.org/gems/multi_json-1.3.2.gem)
An error occured while installing multi_json (1.3.2), and Bundler cannot continue.
Make sure that `gem install multi_json -v '1.3.2'` succeeds before bundling.
Cuando intento instalar la gema manualmente (por gem install multi_json -v '1.3.2'
) funciona. El mismo problema ocurre con varias otras gemas. Uso RVM (1.12.3), ruby 1.9.2, bundler 1.1.3.
¿Cómo arreglarlo?
28 answers
Actualización
Ahora que tengo karma wh..errar extraído lo suficiente de esta respuesta todo el mundo debe saber que esto debería haber sido arreglado.
Re: via Ownatik again la instalación del paquete falla con un error de verificación del certificado SSL
gem update --system
Mi respuesta sigue siendo correcta y se deja a continuación como referencia si eso termina no funcionando para usted.
Honestamente, la mejor solución temporal es
[...] utilice la versión no ssl de rubygems en su gemfile como solución temporal.
A través del usuario Ownatik
Lo que significan está en la parte superior de Gemfile
en su directorio de aplicaciones rails change
source 'https://rubygems.org'
A
source 'http://rubygems.org'
Tenga en cuenta que la segunda versión es http en lugar de https
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 11:55:02
Reemplace el origen de la gema ssl con no ssl como solución temporal:
- fuentes de gemas-r https://rubygems.org /
- fuentes de gemas-a http://rubygems.org /
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-08-08 15:28:36
La razón es el viejo rubygems. Primero debe actualizar la parte del sistema utilizando una fuente no ssl:
gem update --system --source http://rubygems.org/
(actualizar temporalmente la parte del sistema utilizando una conexión no ssl).
Ahora está listo para usar gem update
.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-11-02 13:29:43
Si estás en un mac y usas una versión reciente de RVM (~1.20), el siguiente comando funcionó para mí.
rvm osx-ssl-certs update
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-02 18:03:08
Este problema ahora debe solucionarse. Actualice rubygems (gem update --system
), asegúrese de que openssl esté en la última versión de su sistema operativo, o pruebe estos consejos de que todavía no funciona: http://railsapps.github.com/openssl-certificate-verify-failed.html
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-16 17:22:14
Solución Temporal (como aludió Ownatik):
Crear o modificar un archivo llamado .gemrc en su ruta de inicio, incluyendo la línea :ssl_verify_mode: 0
Esto evitará que bundler revise los certificados SSL de las gemas cuando intente instalarlas.
Para los dispositivos *nix, 'ruta de inicio' significa ~/.gemrc
. También puede crear /etc/gemrc
, si lo prefiere. Para Windows XP,' home path ' significa c:\Documents and Settings\All Users\Application Data\gemrc
. Para Windows 7, C:\ProgramData\gemrc
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-04-20 17:03:09
En windows7 puede descargar el cacert.pem file from here and set the environementvariable SSL_CERT_FILE to the path where you store the certificate eg
SET SSL_CERT_FILE="C:\users\<username>\cacert.pem"
O puede establecer la variable en su script de esta manera ENV['SSL_CERT_FILE']="C:/users/<username>/cacert.pem"
Reemplace
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-03-21 18:17:36
La verdadera solución a este problema, si está utilizando RVM:
- Actualizar rubygems:
gem update --system
- Utilice RVM para actualizar certificados SSL:
rvm osx-ssl-certs update all
Hat tip para este tip en el proyecto RailsApps!
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-22 03:50:02
Para aquellos de ustedes que tienen ruby instalado a través de RVM y quieren una solución rápida (prefiriendo no leer según la solicitud de Bruno) solo prueben esto:
rvm remove 1.9.x (or whatever version of ruby you are using)
rvm pkg install openssl
rvm install 1.9.2 --with-openssl-dir=$rvm_path/usr
Para más detalles, aquí está el enlace donde encontré la solución.
Http://railsapps.github.com/openssl-certificate-verify-failed.html
Por cierto, no tuve que tocar mis certificados en Ubuntu.
Lo mejor de todo, esto no es una solución. Descargará gemas a través de SSL y falla si hay si hay un problema como un hombre en el medio ataque que es mucho mejor que simplemente desactivar la seguridad.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-04-28 12:02:06
Esto ha sido arreglado
Http://guides.rubygems.org/ssl-certificate-update /
Ahora que RubyGems 2.6.x ha sido liberado, puede actualizar manualmente a esta versión.
Descargar https://rubygems.org/downloads/rubygems-update-2.6.7.gem
Por favor, descargue el archivo en un directorio al que pueda apuntar más tarde (por ejemplo. la raíz de su disco duro C:)
Ahora, usando su Símbolo del sistema:
C:\>gem install --local C:\rubygems-update-2.6.7.gem
C:\>update_rubygems --no-ri --no-rdoc
Después de esto, gem version version debería informar la nueva versión de actualización.
Ahora puede desinstalar rubygems-update gem:
C:\>gem uninstall rubygems-update -x
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-10-20 12:25:37
Puede descargar una lista de certificados de CA desde el sitio web de curl en http://curl.haxx.se/ca/cacert.pem
Luego establezca la variable de entorno SSL_CERT_FILE para decirle a Ruby que la use. Por ejemplo, en Linux:
$ SSL_CERT_FILE=~/cacert.pem bundle install
(Referencia: https://gist.github.com/fnichol/867550)
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-18 05:36:20
Instrucciones simples de copiar y pegar dadas aquí acerca de .pem file
Https://gist.github.com/luislavena/f064211759ee0f806c88
Para la verificación del certificado falló
Si has leído las secciones anteriores, sabrás lo que esto significa (y vergüenza > en ti si no lo has hecho).
Necesitamos descargar AddTrustExternalCARoot-2048.pem . Abra un símbolo del sistema y escriba:
C: > gema que rubygems C:/Ruby21/lib/ruby/2.1.0/rubygems.po Ahora, vamos a localizar ese directorio. Desde dentro de la misma ventana, ingrese la parte de la ruta hasta la extensión del archivo, pero usando barras invertidas en su lugar:
C: > inicio C:\Ruby21\lib\ruby\2.1.0\rubygems Esto abrirá una ventana del Explorador dentro del directorio que indicamos.
Paso 3: Copie el nuevo certificado de confianza
Ahora, localice el directorio ssl_certs y copie el .archivo pem que obtuvimos del paso anterior dentro.
Se listará con otros archivos como GeoTrustGlobalCA.pem.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-05-03 16:11:46
Mismo problema pero con gema diferente aquí:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3
read server certificate B: certificate verify failed
(https://bb-m.rubygems.org/gems/builder-3.0.0.gem)
An error occured while installing builder (3.0.0), and Bundler cannot continue.
Make sure that `gem install builder -v '3.0.0'` succeeds before bundling.
Solución temporal: gem install builder -v '3.0.0'
permite continuar bundle install
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-04-20 15:16:54
Así es como solucionas este problema en Windows:
Descargar .perm archivo a continuación, establecer el SSL_CERT_FILE en símbolo del sistema
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-05-09 04:58:56
Recibo un error ligeramente diferente, aunque quizás relacionado, en Ubuntu 12.04:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=unknown state: sslv3 alert handshake failure (https://d2chzxaqi4y7f8.cloudfront.net/gems/activesupport-3.2.3.gem)
An error occured while installing activesupport (3.2.3), and Bundler cannot continue.
Make sure that `gem install activesupport -v '3.2.3'` succeeds before bundling.
Sucede cuando corro bundle install
con source 'https://rubygems.org'
en un Gemfile.
Este es un problema con OpenSSL en Ubuntu 12.04. Ver Rubygems issue #319 .
Para arreglar esto, ejecute apt-get update && apt-get upgrade
en Ubuntu 12.04 para actualizar su OpenSSL.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-05-03 17:47:43
La solución más simple:
rvm pkg install openssl
rvm reinstall all --force
Voila!
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-16 14:57:10
Pude rastrear esto hasta el hecho de que los binarios que rvm
descargas no juegan bien con OpenSSL de OS X, que es viejo y ya no es utilizado por el sistema operativo.
La solución para mí fue forzar la compilación al instalar Ruby a través de rvm
:
rvm reinstall --disable-binary 2.2
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-10-18 19:20:12
Mi corrección permanente para Windows:
Descargar el CACert , guardar como
C:\ruby\ssl_certs\GlobalSignRootCA.pem
de http://guides.rubygems.org/ssl-certificate-update/Cree la variable del sistema llamada " SSL_CERT_FILE", establecida en
C:\ruby\ssl_certs\GlobalSignRootCA.pem
.Inténtalo de nuevo:
gem install bundler
:
C:\gem sources *** CURRENT SOURCES *** https://rubygems.org/ C:\gem install bundler Fetching: bundler-1.13.5.gem (100%) Successfully installed bundler-1.13.5 1 gem installed
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-10-19 18:47:23
Thx a @Alexander.Iljushkin for:
gem update --system --source http://rubygems.org/
Después de eso bundler todavía falló y la solución a eso fue:
gem install bundler
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-18 19:48:18
Estaba recibiendo un error similar. Así es como resolví esto: En tu directorio de ruta, busca Gemfile. Edite el origen en el gemfile a http en lugar de https y guárdelo. Esto podría instalar el bundler sin el problema del certificado SSL.l
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-03-24 17:53:49
Para la máquina Windows, verifique su versión de gema con
gem --version
Luego actualiza tu gema de la siguiente manera:
- Ejecutando 1.8.x: descargar 1.8.30
- Ejecutando 2.0.x: descargar 2.0.15
- Ejecutando 2.2.x: descargar 2.2.3
Por favor, descargue el archivo en un directorio al que pueda apuntar más tarde (por ejemplo. la raíz de su disco duro C:)
Ahora, usando su Símbolo del sistema:
C:\>gem install --local C:\rubygems-update-1.8.30.gem
C:\>update_rubygems --no-ri --no-rdoc
Ahora, la instalación del paquete tendrá éxito sin Error de verificación del certificado SSL.
Una instrucción más detallada es aquí
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-06-17 00:11:43
Esto funcionó para mí:
- descargar la última gema en https://rubygems.org/pages/download
- instale la gema con
gem install --local [path to downloaded gem file]
- actualiza las gemas con
update_rubygems
- comprueba que estás en la última versión de gema con
gem --version
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-10-12 20:08:13
Tuve que reinstalar openssl:
brew uninstall --force openssl
brew install openssl
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-11-04 19:37:49
Recientemente me enfrenté a este problema y seguí los pasos descritos aquí. Es posible que no esté apuntando al certificado OpenSSL correcto. Después de ejecutar:
rvm osx-ssl-certs status all
rvm osx-ssl-certs update all
Y
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
El paquete completo corrió!
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-01-05 07:30:02
Descargar rubygems-update-2.6.7.gem .
Ahora, usando su Símbolo del sistema:
C:\>gem install --local C:\rubygems-update-2.6.7.gem
C:\>update_rubygems --no-ri --no-rdoc
Después de esto, gem --version
debe informar la nueva versión de actualización.
Ahora puede desinstalar rubygems-update gem:
C:\>gem uninstall rubygems-update -x
Removing update_rubygems
Successfully uninstalled rubygems-update-2.6.7
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-01-11 07:24:20
Para tener en cuenta, si está tomando gemas de una fuente en la que una autoridad de certificación interna confía en SSL cert (o se está conectando a una fuente externa a través de un proxy web de la empresa con inspección SSL), apunte su variable env SSL_CERT_FILE a su cadena de certificados. Lo más probable es que esto solo requiera exportar su certificado raíz desde su almacén de certificados (Llavero del sistema en macOS) a una ubicación accesible desde su shell, es decir:
export SSL_CERT_FILE=~/RootCert.pem
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-03-07 13:40:40
Si estás usando rails-assets
Si estaba utilizando https://rails-assets.org/
para administrar sus activos, ninguna respuesta le ayudará. Incluso convertir a http
no ayudará.
La solución más simple es usar esta fuente en su lugar, http://insecure.rails-assets.org
. Esto ha sido mencionado en su página de inicio .
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-04-30 10:52:22
Lo único que funcionó para mí en el sistema windows heredado y la versión ruby 1.9 es descargar el archivo cacert de http://guides.rubygems.org/ssl-certificate-update /
Y luego ejecutar el comando debajo antes de ejecutar bundle install
bundle config --global ssl_ca_cert /path/to/file.pem
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-08-18 07:39:47