Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Workaround RubyGems' SSL errors on Ruby for Windows (RubyInstaller)

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2016-12-01: Please refer to the official guide instead of this process.

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to pull updates from RubyGems:

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

This error is produced by changes in rubygems.org infrastructure, please keep reading to better understand it.

If you're one of those too long, didn't read just skip to the guide on how to workaround it.

Background

For those who are not familiar with SSL and certificates, there are many parts that make secure serving of content possible.

SSL certificates are used on the website, which are obtained from a certificate authority (CA) and generated from a private key, along with its respective signature.

Normally and up until a few months ago, private key signatures used SHA-1 as way to provide a digest (or checksum) of the private key without distributing the key itself (remember, needs to remain private).

SHA-1 has been encountered weak and lot of web servers and sites have been upgrading towards SHA-2 (specifically SHA256 or higher) in order to prepare for the browsers changes.

Specific problem with RubyGems

The particular case of RubyGems (the command line tool) is that it requires to bundle inside of its code the trust certificates, which allow RubyGems to establish a connection with the servers even when base operating system is unable to verify the identity of them.

Up until a few months ago, this certificate was provided by one CA, but newer certificate is provided by a different one.

Because of this, existing installations of RubyGems would have to been updated before the switch of the certificate and give enough time for the change to spread (and people to update).

As what normally happens with software, things might get out of sync and coordinate such effort, to the size and usage of rubygems.org is almost impossible.

I've described this on Issue #1050

We had discussed also on IRC, and patches and backports were provided to all major branches of RubyGems: 1.8, 2.0, 2.2, 2.4 and 2.6

Please understand this could happen to anyone. Release multiple versions of any software in a short span of time and be very time sensitive is highly complicated.

Even if we have official releases of any of the versions that correct the issue, it will not be possible install those via RubyGems (chicken-egg problem described before).

Installing using update packages

RubyGems has covered this in the official guides, please follow the instructions here

It involves:

  • Manually downloading the latest .gem file.
  • Installing it using gem install --local
  • Run the update_rubygems command
  • Profit

You should now be able to install gems normally.

If you still experience any issue, please search for any existing issue on RubyGems Issue Tracker or report a new one.

@drbrain

This comment has been minimized.

Copy link

@drbrain drbrain commented Dec 2, 2014

I think we should add this to guides.rubygems.org

@takueof

This comment has been minimized.

Copy link

@takueof takueof commented Dec 3, 2014

+1

@trabulmonkee

This comment has been minimized.

Copy link

@trabulmonkee trabulmonkee commented Dec 3, 2014

Thanks for the insight and workaround. Just tried it out and gem installs are working now.
ruby -v
ruby 2.0.0p598 (2014-11-13) [i386-mingw32]
gem -v
2.4.5

@StevieJayCee

This comment has been minimized.

Copy link

@StevieJayCee StevieJayCee commented Dec 3, 2014

You sir, are a 'gem'. Thanks muchly.

@codeodor

This comment has been minimized.

Copy link

@codeodor codeodor commented Dec 3, 2014

Thank you for this. Big help. ❤️ 💚 💜

@luislavena

This comment has been minimized.

Copy link
Owner Author

@luislavena luislavena commented Dec 4, 2014

@trabulmonkee please avoid RubyGems 2.4.x, as mentioned in the instructions, that version is broken on Windows.

@beauxjames-ZZ

This comment has been minimized.

Copy link

@beauxjames-ZZ beauxjames-ZZ commented Dec 4, 2014

Thank you...where do I send the beer?

@brunowego

This comment has been minimized.

Copy link

@brunowego brunowego commented Dec 4, 2014

Thanks @luislavena 😄

@jomko

This comment has been minimized.

Copy link

@jomko jomko commented Dec 4, 2014

thank you!

@bdonaldharris

This comment has been minimized.

Copy link

@bdonaldharris bdonaldharris commented Dec 6, 2014

THANK YOU!!!!!!!!!!!

@tsanak

This comment has been minimized.

Copy link

@tsanak tsanak commented Dec 7, 2014

Thank you so much!! 😃 😄

@rroman81

This comment has been minimized.

Copy link

@rroman81 rroman81 commented Dec 9, 2014

great stuff, boy. This is definitely needs to be added to the guide.
Btw, how do i update the documentation of the already installed gems. I had to use --source http://api.rubygems.org option to get some gems while experiencing this issue.

@rmorrin

This comment has been minimized.

Copy link

@rmorrin rmorrin commented Dec 10, 2014

Awesome stuff, fixed the issue for me too! 👍

@voku

This comment has been minimized.

Copy link

@voku voku commented Dec 10, 2014

Thx for this +1

@TImPDaley

This comment has been minimized.

Copy link

@TImPDaley TImPDaley commented Dec 11, 2014

THANK YOU VERY MUCH...

@jltemple

This comment has been minimized.

Copy link

@jltemple jltemple commented Dec 11, 2014

+1, +1 for adding this to the guide

@perfmoron

This comment has been minimized.

Copy link

@perfmoron perfmoron commented Dec 12, 2014

Naice job!

@robert-toth

This comment has been minimized.

Copy link

@robert-toth robert-toth commented Dec 12, 2014

Works like a charm. Thanks!

@jdonaldson10

This comment has been minimized.

Copy link

@jdonaldson10 jdonaldson10 commented Dec 13, 2014

Thanks 👍

@vtypal

This comment has been minimized.

Copy link

@vtypal vtypal commented Dec 13, 2014

Thank you

@nakoo

This comment has been minimized.

Copy link

@nakoo nakoo commented Dec 13, 2014

Thanks!

@st0le

This comment has been minimized.

Copy link

@st0le st0le commented Dec 14, 2014

+1

@dlwilson88

This comment has been minimized.

Copy link

@dlwilson88 dlwilson88 commented Dec 14, 2014

Yet another happy coder

@gmarini

This comment has been minimized.

Copy link

@gmarini gmarini commented Dec 16, 2014

Thanks! It works!

@PeterCamilleri

This comment has been minimized.

Copy link

@PeterCamilleri PeterCamilleri commented Dec 16, 2014

Heart filled gratitude and thanks!

@master777

This comment has been minimized.

Copy link

@master777 master777 commented Dec 16, 2014

Thanks!!

@ferventcoder

This comment has been minimized.

Copy link

@ferventcoder ferventcoder commented Dec 16, 2014

👍

@tangorri

This comment has been minimized.

Copy link

@tangorri tangorri commented Dec 17, 2014

Thanks a lot !

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Dec 17, 2014

Works great! Thanks!

@kastuart

This comment has been minimized.

Copy link

@kastuart kastuart commented Dec 18, 2014

Sweet baby jesus it works! You're the best!

@jethroo

This comment has been minimized.

Copy link

@jethroo jethroo commented Dec 18, 2014

awesome 🍸

@RichardHorton

This comment has been minimized.

Copy link

@RichardHorton RichardHorton commented Dec 18, 2014

Thank you!

@poleveD

This comment has been minimized.

Copy link

@poleveD poleveD commented Dec 18, 2014

Saved me lots of pain! Thank you!!

@datacoda

This comment has been minimized.

Copy link

@datacoda datacoda commented Dec 18, 2014

Thank you.

@omarsar

This comment has been minimized.

Copy link

@omarsar omarsar commented Dec 18, 2014

Worked great. Thanks for the fix!

@BenCrook

This comment has been minimized.

Copy link

@BenCrook BenCrook commented Dec 18, 2014

Thank you!

@EtaiG

This comment has been minimized.

Copy link

@EtaiG EtaiG commented Dec 19, 2014

Thanks - this is exactly what I needed.

Thank you also for the well written explanation!

@sharavsambuu

This comment has been minimized.

Copy link

@sharavsambuu sharavsambuu commented Dec 20, 2014

cool! it work like a charm

@jjgh

This comment has been minimized.

Copy link

@jjgh jjgh commented Dec 20, 2014

Thanks. For some reason it was not working to me on Win7-64 until I added the "SSL_CERT_FILE" env. var with:

C:\set SSL_CERT_FILE=C:\Ruby200-x64\lib\ruby\2.0.0\rubygems\ssl_certs\AddTrustExternalCARoot-2048.pem

On a side-side-side note I'm experiencing the usual infinite CPU hog while installing rubygems darkfish documentation. This has been reported many times (at least on windows) and happens now and then with any gems... just a reminder in case someone wants something to work on ;)

@luislavena

This comment has been minimized.

Copy link
Owner Author

@luislavena luislavena commented Dec 21, 2014

Folks,

I've updated the gist to include instructions on how to manually upgrade using the released update packages.

Cheers.

@thany

This comment has been minimized.

Copy link

@thany thany commented Dec 21, 2014

Works.

Now the guys at ruby can go an incorporate this into the installer. It's quite rediculous to have to do this for every new Ruby installation.

@hmurillop

This comment has been minimized.

Copy link

@hmurillop hmurillop commented Dec 22, 2014

Thank you so much!! i have used the Manual solution to SSL issue and it worked great!!

@architrathi

This comment has been minimized.

Copy link

@architrathi architrathi commented Dec 22, 2014

A big thank you! Took a lot of time to find this thread.

@krisimmig

This comment has been minimized.

Copy link

@krisimmig krisimmig commented Dec 22, 2014

thumbs up!

@chiefy

This comment has been minimized.

Copy link

@chiefy chiefy commented Dec 22, 2014

👍 Windows 8.1 x64 ruby 2.0.0p481 mingw

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Dec 22, 2014

Works perfectly on Windows 7 x64 with Ruby 2.1.5p273 (2014-11-13 revision 48405) [x64-mingw32]
Thank you so much!

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Dec 24, 2014

It works.
Thank you so much :)

@ClementNerma

This comment has been minimized.

Copy link

@ClementNerma ClementNerma commented Dec 24, 2014

Thank you very much !!!! 😄

@miau

This comment has been minimized.

Copy link

@miau miau commented Dec 25, 2014

I've written a dirty one-liner that do steps of "Manual solution to SSL issue". It works on Windows.
https://gist.github.com/miau/1b9eb877acb57f6c4c58

@jtlindsey

This comment has been minimized.

Copy link

@jtlindsey jtlindsey commented Dec 26, 2014

Thanks, installing using update package (new) worked for me on Win7 pro

@Alex-Fortin

This comment has been minimized.

Copy link

@Alex-Fortin Alex-Fortin commented Dec 28, 2014

Thanks so much. great explanation

@mikeoconnell

This comment has been minimized.

Copy link

@mikeoconnell mikeoconnell commented Dec 28, 2014

Thanks for this! Back to my tutorials...

@dunake

This comment has been minimized.

Copy link

@dunake dunake commented Dec 29, 2014

thank you so much

@menz1es

This comment has been minimized.

Copy link

@menz1es menz1es commented Dec 29, 2014

@miau your the man, that beast of a one-liner worked a treat.

@krestt

This comment has been minimized.

Copy link

@krestt krestt commented Dec 30, 2014

You are the Man!! Thank you very much!

@prideloki

This comment has been minimized.

Copy link

@prideloki prideloki commented Dec 31, 2014

thank you

@benmathews1

This comment has been minimized.

Copy link

@benmathews1 benmathews1 commented Dec 31, 2014

Hi! I'm really really new to coding in general and pretty much everything specifically and I was following the lynda.com tutorial regarding installing Ruby on Rails until I encountered this error. Unfortunately, though I tried several times to apply the above fix, I'm still stuck! For one thing, when I click the link for the trust certificate I get a big block of text, which I think is correct, but I'm not sure how to "download" this or place it anywhere. And then in step two, when I do the "locat[ing] the directory" step a little window does appear, but it vanishes almost immediately. Past that I don't really know what to do? I've tried pasting the trust certificate text directly in the command prompt box deal, which didn't work, and I've tried opening that vanishing window again and again but it just disappears over and over. Again, I have no clue what I'm doing and I'm sure I'm making some huge ookie mistake but any advice would be greatly appreciated!! Thanks!!!

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jan 3, 2015

THANK YOU!

@mctolentino

This comment has been minimized.

Copy link

@mctolentino mctolentino commented Jan 4, 2015

Works perfectly! Thanks for the workaround.

@trabulmonkee

This comment has been minimized.

Copy link

@trabulmonkee trabulmonkee commented Jan 5, 2015

@luislavena - So updating to rubygems 2.4.x after doing this manual update is not advised, should just stay at 2.0.15? My understanding was that it was just a cert key issue which gets resolved after doing the manual update.

@nagoshiashumari

This comment has been minimized.

Copy link

@nagoshiashumari nagoshiashumari commented Jan 6, 2015

Thank you for this. :+1

@newbro

This comment has been minimized.

Copy link

@newbro newbro commented Jan 6, 2015

Another thank you from me :D

@GeetaGh

This comment has been minimized.

Copy link

@GeetaGh GeetaGh commented Jan 6, 2015

Thank you..

@GeetaGh

This comment has been minimized.

Copy link

@GeetaGh GeetaGh commented Jan 6, 2015

Surprisingly when I installed compass for the first time, i didn't have to do anything , but while upgrading I was facing this issue. And I was completely going in wrong way, until I was your post. Thank you.

@DuongAnh

This comment has been minimized.

Copy link

@DuongAnh DuongAnh commented Jan 6, 2015

Thanks for your help ! PERFECT ^_^

@bjbussell

This comment has been minimized.

Copy link

@bjbussell bjbussell commented Jan 6, 2015

Thanks!

@lostandfownd

This comment has been minimized.

Copy link

@lostandfownd lostandfownd commented Jan 7, 2015

Tnx , solved the problem instantly , best fix on the web

@intuedge

This comment has been minimized.

Copy link

@intuedge intuedge commented Jan 7, 2015

@benmathews1 -- don't click the link to open it. right-click and select save-as, and then follow the guidelines to make sure that the file you save ends up with the proper .pem extension.

@neoalvaro

This comment has been minimized.

Copy link

@neoalvaro neoalvaro commented Jan 8, 2015

Luis I got stuck in step 3 of "Manual Solution", how can I locate ssl_certs directory and copy the .pem file? on a pc windows 8? I'm a total newbie in all this programing field. thanks

@mmm13

This comment has been minimized.

Copy link

@mmm13 mmm13 commented Jan 8, 2015

Thanks! working now..

@MikaelSmith

This comment has been minimized.

Copy link

@MikaelSmith MikaelSmith commented Jan 8, 2015

Thank you so much for your work on this.

@obiora22

This comment has been minimized.

Copy link

@obiora22 obiora22 commented Jan 9, 2015

Awesome help. Thank you!!!

@circleupx

This comment has been minimized.

Copy link

@circleupx circleupx commented Jan 10, 2015

Perfect 😄

@webdevilopers

This comment has been minimized.

Copy link

@webdevilopers webdevilopers commented Jan 10, 2015

👍

@TobiasAxelsson

This comment has been minimized.

Copy link

@TobiasAxelsson TobiasAxelsson commented Jan 10, 2015

Thanks for your work on this, had problems for days but thought it was my firewall or network.
For some reason the folder is protected (win7 64 admin-rights) and the commands fail. But the manual operation worked. Thanks again!

@Limess

This comment has been minimized.

Copy link

@Limess Limess commented Jan 11, 2015

Worked for me, thank you.

@dmitryvmin

This comment has been minimized.

Copy link

@dmitryvmin dmitryvmin commented Jan 13, 2015

Fixed. Thank you!

@dniman

This comment has been minimized.

Copy link

@dniman dniman commented Jan 15, 2015

Great job! Thanks!

@sterswift

This comment has been minimized.

Copy link

@sterswift sterswift commented Jan 15, 2015

thanks, man, you saved my ass

@anicething

This comment has been minimized.

Copy link

@anicething anicething commented Jan 15, 2015

thans,man,you saved my ass

@webandmobilesoultion

This comment has been minimized.

Copy link

@webandmobilesoultion webandmobilesoultion commented Jan 15, 2015

Thanks for your help.
This issue is very useful for ROR install on windows 7.
Again say "Thanks for your help luislavena! Great ,Perfectly "

@dongchen

This comment has been minimized.

Copy link

@dongchen dongchen commented Jan 19, 2015

Thank you. This worked for me.

@jfloff

This comment has been minimized.

Copy link

@jfloff jfloff commented Jan 20, 2015

👍

@yubrajpokharel

This comment has been minimized.

Copy link

@yubrajpokharel yubrajpokharel commented Jan 21, 2015

thats great thanks a lot

@cfetty

This comment has been minimized.

Copy link

@cfetty cfetty commented Jan 21, 2015

Clarification on step 2. Simply copy the new cert file to the cert directory under Ruby. For example mine was under C:\Ruby21-x64\lib\ruby\2.1.0\rubygems\ssl_certs

@UdayKumarDas

This comment has been minimized.

Copy link

@UdayKumarDas UdayKumarDas commented Jan 22, 2015

Thank you very much, it's really helpfull

@kyusufm

This comment has been minimized.

Copy link

@kyusufm kyusufm commented Jan 23, 2015

Thank you so much, it's really help.

@levserk

This comment has been minimized.

Copy link

@levserk levserk commented Jan 23, 2015

Thank you so much!

@yaooluu

This comment has been minimized.

Copy link

@yaooluu yaooluu commented Jan 24, 2015

Thank you sir! Nothing can express my gratitude for your article. Thank you!!!

@watersavvy

This comment has been minimized.

Copy link

@watersavvy watersavvy commented Jan 25, 2015

Thank you! I had to do a small modification to the process by downloading 2.2.3, then pulling the SSL Cert from that file and placing it into the original Ruby DL pack.

@vike27

This comment has been minimized.

Copy link

@vike27 vike27 commented Jan 26, 2015

Thank you!!!! Finally I can get back to coding!

@alkinkasap

This comment has been minimized.

Copy link

@alkinkasap alkinkasap commented Jan 26, 2015

all i can say is, That's Great! thank you..

@stephendanner

This comment has been minimized.

Copy link

@stephendanner stephendanner commented Jan 27, 2015

Awesome! Worked perfectly on my Windoze 7 system. Thanks. Now I can get back to the Ruby on Rails intro.

@fanian

This comment has been minimized.

Copy link

@fanian fanian commented Jan 28, 2015

Amazing! Thanks for your participation!

@valgreen01

This comment has been minimized.

Copy link

@valgreen01 valgreen01 commented Jan 28, 2015

Thanks a lot! it works 😀

@fikriauliya

This comment has been minimized.

Copy link

@fikriauliya fikriauliya commented Jan 29, 2015

Thanks it works 👍

@maximgatilin

This comment has been minimized.

Copy link

@maximgatilin maximgatilin commented Jan 29, 2015

Very helpful, thanks

@SleepWalker

This comment has been minimized.

Copy link

@SleepWalker SleepWalker commented Jan 30, 2015

Thanks a lot! rubygems-update worked for me

@cobyasante

This comment has been minimized.

Copy link

@cobyasante cobyasante commented Jan 30, 2015

This should be part of the manual, in fact it should the first thing you see before you start going about installing ruby or rails
Thanks guys you have saved me a lot of headaches

@aoeasif

This comment has been minimized.

Copy link

@aoeasif aoeasif commented Jan 31, 2015

Thanks it's works fine. 😄 :

@ifkas

This comment has been minimized.

Copy link

@ifkas ifkas commented Feb 1, 2015

Beautiful, works as a charm, thanks bunch!

@Landish

This comment has been minimized.

Copy link

@Landish Landish commented Feb 2, 2015

I can't believe this. It finally works.
Many thanks to you @luislavena, you're my hero 😊

@ShulinChen

This comment has been minimized.

Copy link

@ShulinChen ShulinChen commented Feb 2, 2015

Thanks you so much!!!! After almost 2 hours of trying all kinds of technique, this one finally works!!Couldnt be more thankful

@chebaby

This comment has been minimized.

Copy link

@chebaby chebaby commented Feb 3, 2015

thank you @luislavena, it works

@charlesuko

This comment has been minimized.

Copy link

@charlesuko charlesuko commented Feb 4, 2015

thanks so much. this worked perfectly

@rezadehganpour

This comment has been minimized.

Copy link

@rezadehganpour rezadehganpour commented Feb 4, 2015

Hey Luis Thank you very much for this, However I followed all of your steps and still I have the certification problem my gem version was: 2.2.2 and with your help I upgrade that to 2.2.3. my "gem which rubygems" command return C:ror/Ruby200/lib/ruby/site_ruby/2.1.0/rubygems.rm.
When I tried to copy the .pem file that you provide in the ssl_certs file the name of the file was already exist so I replaced it! I just want to be as specific as I can so you can help me with this better!

Thanks a million!

@anisabboud

This comment has been minimized.

Copy link

@anisabboud anisabboud commented Feb 7, 2015

Thank you!

@KabbAmine

This comment has been minimized.

Copy link

@KabbAmine KabbAmine commented Feb 7, 2015

Thank you very much 😄

@kspurgin

This comment has been minimized.

Copy link

@kspurgin kspurgin commented Feb 9, 2015

++ thanks.

@MattForerunner

This comment has been minimized.

Copy link

@MattForerunner MattForerunner commented Feb 9, 2015

I must be really bad with computers or something but I can not get this to work for the life of me!

@MattForerunner

This comment has been minimized.

Copy link

@MattForerunner MattForerunner commented Feb 9, 2015

Thank you JESUS I GOT IT TO WORK!!!!

@sweco-seprst

This comment has been minimized.

Copy link

@sweco-seprst sweco-seprst commented Feb 12, 2015

Is this suppose to also work on mac? I can't get it to work.

@prasanthkarukkuvel

This comment has been minimized.

Copy link

@prasanthkarukkuvel prasanthkarukkuvel commented Feb 12, 2015

Saved my day! Thank you 😊

@anilpanthi

This comment has been minimized.

Copy link

@anilpanthi anilpanthi commented Feb 13, 2015

thanks bro

@mrwhitney

This comment has been minimized.

Copy link

@mrwhitney mrwhitney commented Feb 14, 2015

Downloaded rubygems-update-2.2.3.gem from https://github.com/rubygems/rubygems/releases/tag/v2.2.3

gem install --local ubygems-update-2.2.3.gem
#  Successfully installed rubygems-update-2.2.3

gem --version
#2.2.2

Using Git bash on Windows 7.

Edit: I missed

update_rubygems --no-ri --no-rdoc
@nipendar

This comment has been minimized.

Copy link

@nipendar nipendar commented Feb 15, 2015

Thank you...very nice explanation

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Feb 16, 2015

Thank you very much, now I'm able to start with SASS 😂

@MickCreates

This comment has been minimized.

Copy link

@MickCreates MickCreates commented Feb 19, 2015

This is perfect! It solved my dilemma, I thought I was going mad running around in circles trying to get a few simple gems installed but this really did the trick.

Thank you!

@Sailaja13

This comment has been minimized.

Copy link

@Sailaja13 Sailaja13 commented Feb 19, 2015

Thanks a lot!

@Andrelton

This comment has been minimized.

Copy link

@Andrelton Andrelton commented Feb 19, 2015

THANK YOU!

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Feb 19, 2015

Thanks very much!!!!!!!!!!!!!!

@rashmibmanyam

This comment has been minimized.

Copy link

@rashmibmanyam rashmibmanyam commented Feb 20, 2015

I followed all the steps that you have mentioned, but I still see the same error. :(

@DerekFoulk

This comment has been minimized.

Copy link

@DerekFoulk DerekFoulk commented Feb 20, 2015

My god. Now I can use Jekyll to build my Bootstrap. Thank you. Thank you thank you thank (a million times) thank you. This worked like a charm...

@mawwerik

This comment has been minimized.

Copy link

@mawwerik mawwerik commented Feb 20, 2015

Thanks for this excellent description...

@RomainBrunias

This comment has been minimized.

Copy link

@RomainBrunias RomainBrunias commented Feb 21, 2015

Thanks.

@harellevy

This comment has been minimized.

Copy link

@harellevy harellevy commented Feb 22, 2015

Thanks!!! that helped me!!

@akshitshah

This comment has been minimized.

Copy link

@akshitshah akshitshah commented Feb 23, 2015

helped!!! rockstar you are!!!

@jansmolders86

This comment has been minimized.

Copy link

@jansmolders86 jansmolders86 commented Feb 23, 2015

Thanks a bunch! 👍

@diazemiliano-zz

This comment has been minimized.

Copy link

@diazemiliano-zz diazemiliano-zz commented Feb 24, 2015

Thanks! 👌

@dynamite-ready

This comment has been minimized.

Copy link

@dynamite-ready dynamite-ready commented Feb 24, 2015

Can't you just add the cert to the latest installation packages, and shorten the guide above?

@hpasweden

This comment has been minimized.

Copy link

@hpasweden hpasweden commented Feb 24, 2015

Works fine! thx

@ben-rubin

This comment has been minimized.

Copy link

@ben-rubin ben-rubin commented Feb 25, 2015

Thank you!

@SHenry77

This comment has been minimized.

Copy link

@SHenry77 SHenry77 commented Feb 25, 2015

Thank you, I was at a loss. You got me back on track.

@abdullahnaseer

This comment has been minimized.

Copy link

@abdullahnaseer abdullahnaseer commented Feb 25, 2015

Thank you!

@purduekenny

This comment has been minimized.

Copy link

@purduekenny purduekenny commented Feb 25, 2015

You're the best.

@satphonix

This comment has been minimized.

Copy link

@satphonix satphonix commented Feb 26, 2015

Thanks, it works!

@rezwan-hossain

This comment has been minimized.

Copy link

@rezwan-hossain rezwan-hossain commented Feb 27, 2015

thank u its work

@wellxion

This comment has been minimized.

Copy link

@wellxion wellxion commented Mar 2, 2015

thx a lot. It's useful

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Mar 3, 2015

+1 +1

@lenazh

This comment has been minimized.

Copy link

@lenazh lenazh commented Mar 3, 2015

Thank you so much!!! I hurt my head bashing it against a wall already!

@acaparrelli

This comment has been minimized.

Copy link

@acaparrelli acaparrelli commented Mar 3, 2015

thank you man!

@mohamedahmed3ali

This comment has been minimized.

Copy link

@mohamedahmed3ali mohamedahmed3ali commented Mar 4, 2015

Thanks so much

@server102

This comment has been minimized.

Copy link

@server102 server102 commented Mar 4, 2015

+1... Thanks alot

@davewallace

This comment has been minimized.

Copy link

@davewallace davewallace commented Mar 4, 2015

+1 much appreciated.

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Mar 4, 2015

To you sir, I am so very grateful. It is much appreciated. +1

@HACKVTT

This comment has been minimized.

Copy link

@HACKVTT HACKVTT commented Mar 4, 2015

Thanks, It's work for me (y)

@vegas0250

This comment has been minimized.

Copy link

@vegas0250 vegas0250 commented Mar 4, 2015

Thanks.

@richpeck

This comment has been minimized.

Copy link

@richpeck richpeck commented Mar 4, 2015

Thank you so much - worked a treat

@chesiljuanich

This comment has been minimized.

Copy link

@chesiljuanich chesiljuanich commented Mar 5, 2015

Thank you so much !
What a big help , it works :)

@widiarifki

This comment has been minimized.

Copy link

@widiarifki widiarifki commented Mar 5, 2015

yep, it works.

@Kcko

This comment has been minimized.

Copy link

@Kcko Kcko commented Mar 5, 2015

Its work 4 me. Thanx for sharing!

@pzurawski83

This comment has been minimized.

Copy link

@pzurawski83 pzurawski83 commented Mar 6, 2015

awsome!!! thanks a lot

@mtrojanowski

This comment has been minimized.

Copy link

@mtrojanowski mtrojanowski commented Mar 7, 2015

Thanks! 👍

@thomthom

This comment has been minimized.

Copy link

@thomthom thomthom commented Mar 7, 2015

Thank you very much for this detailed description and solution. 👍

@brunabxs

This comment has been minimized.

Copy link

@brunabxs brunabxs commented Mar 7, 2015

Thanks a lot!

@vlrprbttst

This comment has been minimized.

Copy link

@vlrprbttst vlrprbttst commented Mar 8, 2015

thaaaaaaaaanks

@euccas

This comment has been minimized.

Copy link

@euccas euccas commented Mar 10, 2015

works perfectly. +1 thanks.

@saaqibz

This comment has been minimized.

Copy link

@saaqibz saaqibz commented Mar 11, 2015

worked like a charm. Thanks

@ptulip

This comment has been minimized.

Copy link

@ptulip ptulip commented Mar 12, 2015

I'm still having problems with this...I've followed the instructions exactly and I'm still getting this (https://gist.github.com/ptulip/4c4358c8fad58f757eed) sort of error.

Any help would be much appreciated. Win7-64, ruby 2.1.5, rubygems 2.2.3

Example code I'm trying to run:

require 'open-uri'
gg = open('https://gg.com')
puts gg

@devhut

This comment has been minimized.

Copy link

@devhut devhut commented Mar 13, 2015

luis for president!

@andersondsl

This comment has been minimized.

Copy link

@andersondsl andersondsl commented Mar 16, 2015

Still Working!!! Thanks luislavena

@rbtsolis

This comment has been minimized.

Copy link

@rbtsolis rbtsolis commented Mar 18, 2015

Thank Youuuuu, Gracias me sirvio mil, ya puedo instalar la gema rhc de OpenShift, es genial 😄

@mikerentas

This comment has been minimized.

Copy link

@mikerentas mikerentas commented Mar 18, 2015

Thank you! Excellent walkthrough, and it worked perfectly!

@KodernPl

This comment has been minimized.

Copy link

@KodernPl KodernPl commented Mar 18, 2015

Updating gems 2.2.2 worked for me. Thank you

@nathanvda

This comment has been minimized.

Copy link

@nathanvda nathanvda commented Mar 18, 2015

Awesome, thanks for the help! I develop on mac and deploy on windows servers, so now I can still use https://rubygems.org as the source. I recently added https://rails-assets.org because it is an incredibly easy way to include bower packages in a rails project. However: this does work on mac, but gives me the same SSL error on windows.

I installed the 2.2.3 gem. I am not sure if this is relevant or not (like: maybe it deleted the old certificate?)

Am I correct in assuming any gem-server's certificate needs to be included in the rubygems package? I am guessing they are not using the same root certificate, or it should just work. So any idea where I can find the certificate for rails-assets.org?

For now i just use http://rails-assets.org as source as a workaround.

@helloncanella

This comment has been minimized.

Copy link

@helloncanella helloncanella commented Mar 20, 2015

Ow. Wonderful. My Christmas Gift was already brought! 😄

@thetypebeast

This comment has been minimized.

Copy link

@thetypebeast thetypebeast commented Mar 24, 2015

Tried the manual install since I have RubyGems version 2.4.x. After testing with gem install json --platform=ruby I'm still getting ERROR: Could not find a valid gem 'json' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read serve r certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

I can verify that the certificate exists in ssl_certs, and is definitely .pem file format.
I'm only using one version of ruby. So what now?

Edit: I did read the entire background and problem, but I might be missing something, since i'm just a designer trying to set this stuff up on a Windows machine so I create my prototypes using Sass, etc.

Windows 7 pro
Ruby 2.2.1p85
RubyGems 2.4.6

@phongkien

This comment has been minimized.

Copy link

@phongkien phongkien commented Mar 25, 2015

very nice, thanks!

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Mar 25, 2015

Thank you! Nice, detailed instructions. Worked perfectly for RubyGems 2.0.14 -> 2.0.15.

@vongoh

This comment has been minimized.

Copy link

@vongoh vongoh commented Mar 25, 2015

Thanks! Did the trick.

Suggestion: you gave instructions under 'Installing using update packages (NEW)'.

Then right under that you gave the instructions for a Manual Install. At first glance it was confusing and made it seem like we also had to do that as well --- you might want to consider re-wording that so it is more clear to people that are simply trying to straighten this out

@maxpower720

This comment has been minimized.

Copy link

@maxpower720 maxpower720 commented Mar 25, 2015

Thanks! That did the trick!

@DeeBaker

This comment has been minimized.

Copy link

@DeeBaker DeeBaker commented Mar 27, 2015

Thank you much. Love the way you write with humor.

@TheNaoX

This comment has been minimized.

Copy link

@TheNaoX TheNaoX commented Mar 28, 2015

¡A huevo! 👍
Thank you so much!

@alecperkey

This comment has been minimized.

Copy link

@alecperkey alecperkey commented Mar 29, 2015

For anyone who is having issues, in particular on 1.9.3 (but maybe others too):

When you do the command 'gem which rubygems'
There are two locations which I happened to mix up

C:\Ruby193\lib\ruby\1.9.1\rubygems\ssl_certs <-- incorrect
C:\Ruby193\lib\ruby\site_ruby\1.9.1\rubygems\ssl_certs <-- correct

Best,
Alec

@JimiofEden

This comment has been minimized.

Copy link

@JimiofEden JimiofEden commented Mar 31, 2015

Similar to @alecperkey, I am on ruby 2.0.0, and I had to put the ssl_certificate in:

C:\Ruby200\lib\ruby\site_ruby\2.0.0\rubygems\ssl_certs

@wilfred05777

This comment has been minimized.

Copy link

@wilfred05777 wilfred05777 commented Apr 1, 2015

Wow! this make my day ! thank you for sharing!

@jumpluff

This comment has been minimized.

Copy link

@jumpluff jumpluff commented Apr 5, 2015

Thank you so much for both the background information and the clear tutorial.

@JTallis

This comment has been minimized.

Copy link

@JTallis JTallis commented Apr 9, 2015

Amazing, thanks!

@bk2git

This comment has been minimized.

Copy link

@bk2git bk2git commented Apr 9, 2015

The solution worked for me with Ruby 1.9.3 on 32 bit Windows 7, but not with Ruby 2.2.0 on 64-bit Windows 8.1 Enterprise.

Rubygems: C:/Ruby22-x64/lib/ruby/2.2.0/rubygems.rb

I put AddTrustExternalCARoot-2048.pem in both C:\Ruby22-x64\lib\ruby\2.2.0\rubygems\ssl_certs and C:\Ruby22-x64\lib\ruby\site_ruby\2.2.0\rubygems\ssl_certs.

@kevinarrieta

This comment has been minimized.

Copy link

@kevinarrieta kevinarrieta commented Apr 11, 2015

Thanks!

@mikebsg01

This comment has been minimized.

Copy link

@mikebsg01 mikebsg01 commented Apr 13, 2015

Eres la leche amigo! Muchas Gracias 😃

@stickerboy

This comment has been minimized.

Copy link

@stickerboy stickerboy commented Apr 13, 2015

Great write up, thanks! :)

@bk2git

This comment has been minimized.

Copy link

@bk2git bk2git commented Apr 14, 2015

Thank you. It worked for me with an older installation of Ruby. But with a new installation of Ruby on a new machine I am having this issue:

Steps: (1) Install Ruby 2.2.1 on Windows 7 x64. (2) Verify "gem --version" returns 2.4.5 (3) Verify "gem which rubygems" returns "C:/Ruby22/lib/ruby/2.2.0/rubygems.rb". (4) In Explorer, go to C:\Ruby22\lib\ruby\2.2.0\rubygems\ssl_certs. (5) Verify that "AddTrustExternalCARoot-2048.pem" already exists and that the content is the same as the content of the pem certificate in this web page's hyperlink. (6) Verify still unable to install a gem and get the SSL error. (7) Overlay the existing pem file with the pem certificate in the hyperlink of this webpage. (8) Verify gem installation returns "ERROR: While executing gem ... (OpenSSL::X509::StoreError)".

@Mikey-Lee

This comment has been minimized.

Copy link

@Mikey-Lee Mikey-Lee commented Apr 17, 2015

nice one !

@meysammeisam

This comment has been minimized.

Copy link

@meysammeisam meysammeisam commented Apr 19, 2015

the same issue as @bk2git (2 comments upper) :

ubuntu 12.04 32bit,
gem --version => "2.4.5"
gem which rubygems => ".rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems.rb"
...

@iconcells

This comment has been minimized.

Copy link

@iconcells iconcells commented Apr 19, 2015

copy the .pem file actually solved the problem. Wonder why that was not being fixed in the installer in the first place for Windows. Thanks a lot.

@mlb5000

This comment has been minimized.

Copy link

@mlb5000 mlb5000 commented Apr 27, 2015

.pem file workout does not work for RubyInstaller - Ruby 2.2.2 x64 - Windows 8.1

ruby --version
ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]

gem --version
2.4.5

Even downloading the latest rubygems gem and installing it doesn't work.

@mlb5000

This comment has been minimized.

Copy link

@mlb5000 mlb5000 commented Apr 27, 2015

Same problem with 2.1.6 32-bit.

@osdk

This comment has been minimized.

Copy link

@osdk osdk commented Apr 29, 2015

It solved my problem... thanks

@MattCordell

This comment has been minimized.

Copy link

@MattCordell MattCordell commented May 2, 2015

Thankyou. This is my first foray into Ruby, and you saved me a lot of pain.

@BahiHussein

This comment has been minimized.

Copy link

@BahiHussein BahiHussein commented May 2, 2015

Thank You. saved my day

@bk2git

This comment has been minimized.

Copy link

@bk2git bk2git commented May 7, 2015

@mlb5000. See same problem. Could the cause be related to 64-bit Windows OS? I see the problem on Windows 7 b4 bit and Windows 8.1 64 bit. I do not see the problem on Windows 7 32 bit.

@gaurav-lad

This comment has been minimized.

Copy link

@gaurav-lad gaurav-lad commented May 11, 2015

Thank you. luislavena

@raoprashanth007

This comment has been minimized.

Copy link

@raoprashanth007 raoprashanth007 commented May 11, 2015

Thanks, It worked for me too

@StevenBR

This comment has been minimized.

Copy link

@StevenBR StevenBR commented May 12, 2015

Worked here on windows 10 tech 64-bit. Thank you!

@flightofthunder

This comment has been minimized.

Copy link

@flightofthunder flightofthunder commented