Create a gist now

Instantly share code, notes, and snippets.

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.

Show comment Hide comment
@drbrain

drbrain Dec 2, 2014

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

drbrain commented Dec 2, 2014

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

@takueof

This comment has been minimized.

Show comment Hide comment
@takueof

takueof Dec 3, 2014

+1

takueof commented Dec 3, 2014

+1

@trabulmonkee

This comment has been minimized.

Show comment Hide comment
@trabulmonkee

trabulmonkee 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

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.

Show comment Hide comment
@StevieJayCee

StevieJayCee Dec 3, 2014

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

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

@codeodor

This comment has been minimized.

Show comment Hide comment
@codeodor

codeodor Dec 3, 2014

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

codeodor commented Dec 3, 2014

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

@luislavena

This comment has been minimized.

Show comment Hide comment
@luislavena

luislavena Dec 4, 2014

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

Owner

luislavena commented Dec 4, 2014

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

@beauxjames

This comment has been minimized.

Show comment Hide comment
@beauxjames

beauxjames Dec 4, 2014

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

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

@brunowego

This comment has been minimized.

Show comment Hide comment
@brunowego

brunowego Dec 4, 2014

Thanks @luislavena 😄

Thanks @luislavena 😄

@jomko

This comment has been minimized.

Show comment Hide comment
@jomko

jomko Dec 4, 2014

thank you!

jomko commented Dec 4, 2014

thank you!

@bdonaldharris

This comment has been minimized.

Show comment Hide comment
@bdonaldharris

bdonaldharris Dec 6, 2014

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

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

@tsanak

This comment has been minimized.

Show comment Hide comment
@tsanak

tsanak Dec 7, 2014

Thank you so much!! 😃 😄

tsanak commented Dec 7, 2014

Thank you so much!! 😃 😄

@rroman81

This comment has been minimized.

Show comment Hide comment
@rroman81

rroman81 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.

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.

Show comment Hide comment
@rmorrin

rmorrin Dec 10, 2014

Awesome stuff, fixed the issue for me too! 👍

rmorrin commented Dec 10, 2014

Awesome stuff, fixed the issue for me too! 👍

@voku

This comment has been minimized.

Show comment Hide comment
@voku

voku Dec 10, 2014

Thx for this +1

voku commented Dec 10, 2014

Thx for this +1

@TImPDaley

This comment has been minimized.

Show comment Hide comment
@TImPDaley

TImPDaley Dec 11, 2014

THANK YOU VERY MUCH...

THANK YOU VERY MUCH...

@jltemple

This comment has been minimized.

Show comment Hide comment
@jltemple

jltemple Dec 11, 2014

+1, +1 for adding this to the guide

+1, +1 for adding this to the guide

@perfmoron

This comment has been minimized.

Show comment Hide comment
@perfmoron

perfmoron Dec 12, 2014

Naice job!

Naice job!

@robert-toth

This comment has been minimized.

Show comment Hide comment
@robert-toth

robert-toth Dec 12, 2014

Works like a charm. Thanks!

Works like a charm. Thanks!

@jdonaldson10

This comment has been minimized.

Show comment Hide comment
@jdonaldson10

jdonaldson10 Dec 13, 2014

Thanks 👍

Thanks 👍

@vtypal

This comment has been minimized.

Show comment Hide comment
@vtypal

vtypal Dec 13, 2014

Thank you

vtypal commented Dec 13, 2014

Thank you

@nakoo

This comment has been minimized.

Show comment Hide comment
@nakoo

nakoo Dec 13, 2014

Thanks!

nakoo commented Dec 13, 2014

Thanks!

@st0le

This comment has been minimized.

Show comment Hide comment
@st0le

st0le Dec 14, 2014

+1

st0le commented Dec 14, 2014

+1

@dlwilson88

This comment has been minimized.

Show comment Hide comment
@dlwilson88

dlwilson88 Dec 14, 2014

Yet another happy coder

Yet another happy coder

@gmarini

This comment has been minimized.

Show comment Hide comment
@gmarini

gmarini Dec 16, 2014

Thanks! It works!

gmarini commented Dec 16, 2014

Thanks! It works!

@PeterCamilleri

This comment has been minimized.

Show comment Hide comment
@PeterCamilleri

PeterCamilleri Dec 16, 2014

Heart filled gratitude and thanks!

Heart filled gratitude and thanks!

@master777

This comment has been minimized.

Show comment Hide comment
@master777

master777 Dec 16, 2014

Thanks!!

Thanks!!

@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

ferventcoder Dec 16, 2014

👍

👍

@tangorri

This comment has been minimized.

Show comment Hide comment
@tangorri

tangorri Dec 17, 2014

Thanks a lot !

Thanks a lot !

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Dec 17, 2014

Works great! Thanks!

ghost commented Dec 17, 2014

Works great! Thanks!

@kastuart

This comment has been minimized.

Show comment Hide comment
@kastuart

kastuart Dec 18, 2014

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

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

@jethroo

This comment has been minimized.

Show comment Hide comment
@jethroo

jethroo Dec 18, 2014

awesome 🍸

jethroo commented Dec 18, 2014

awesome 🍸

@RichardHorton

This comment has been minimized.

Show comment Hide comment
@RichardHorton

RichardHorton Dec 18, 2014

Thank you!

Thank you!

@poleveD

This comment has been minimized.

Show comment Hide comment
@poleveD

poleveD Dec 18, 2014

Saved me lots of pain! Thank you!!

poleveD commented Dec 18, 2014

Saved me lots of pain! Thank you!!

@datacoda

This comment has been minimized.

Show comment Hide comment
@datacoda

datacoda Dec 18, 2014

Thank you.

Thank you.

@omarsar

This comment has been minimized.

Show comment Hide comment
@omarsar

omarsar Dec 18, 2014

Worked great. Thanks for the fix!

omarsar commented Dec 18, 2014

Worked great. Thanks for the fix!

@BenCrook

This comment has been minimized.

Show comment Hide comment
@BenCrook

BenCrook Dec 18, 2014

Thank you!

Thank you!

@EtaiG

This comment has been minimized.

Show comment Hide comment
@EtaiG

EtaiG Dec 19, 2014

Thanks - this is exactly what I needed.

Thank you also for the well written explanation!

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.

Show comment Hide comment
@sharavsambuu

sharavsambuu Dec 20, 2014

cool! it work like a charm

cool! it work like a charm

@jjgh

This comment has been minimized.

Show comment Hide comment
@jjgh

jjgh 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 ;)

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.

Show comment Hide comment
@luislavena

luislavena Dec 21, 2014

Folks,

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

Cheers.

Owner

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.

Show comment Hide comment
@thany

thany 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.

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.

Show comment Hide comment
@hmurillop

hmurillop Dec 22, 2014

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

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

@architrathi

This comment has been minimized.

Show comment Hide comment
@architrathi

architrathi Dec 22, 2014

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

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

@krisimmig

This comment has been minimized.

Show comment Hide comment
@krisimmig

krisimmig Dec 22, 2014

thumbs up!

thumbs up!

@chiefy

This comment has been minimized.

Show comment Hide comment
@chiefy

chiefy Dec 22, 2014

👍 Windows 8.1 x64 ruby 2.0.0p481 mingw

chiefy commented Dec 22, 2014

👍 Windows 8.1 x64 ruby 2.0.0p481 mingw

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost 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 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!

@Eaiman

This comment has been minimized.

Show comment Hide comment
@Eaiman

Eaiman Dec 24, 2014

It works.
Thank you so much :)

Eaiman commented Dec 24, 2014

It works.
Thank you so much :)

@ClementNerma

This comment has been minimized.

Show comment Hide comment
@ClementNerma

ClementNerma Dec 24, 2014

Thank you very much !!!! 😄

Thank you very much !!!! 😄

@miau

This comment has been minimized.

Show comment Hide comment
@miau

miau 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

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.

Show comment Hide comment
@jtlindsey

jtlindsey Dec 26, 2014

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

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

@Alex-Fortin

This comment has been minimized.

Show comment Hide comment
@Alex-Fortin

Alex-Fortin Dec 28, 2014

Thanks so much. great explanation

Thanks so much. great explanation

@mikeoconnell

This comment has been minimized.

Show comment Hide comment
@mikeoconnell

mikeoconnell Dec 28, 2014

Thanks for this! Back to my tutorials...

Thanks for this! Back to my tutorials...

@dunake

This comment has been minimized.

Show comment Hide comment
@dunake

dunake Dec 29, 2014

thank you so much

dunake commented Dec 29, 2014

thank you so much

@menz1es

This comment has been minimized.

Show comment Hide comment
@menz1es

menz1es Dec 29, 2014

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

menz1es commented Dec 29, 2014

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

@krestt

This comment has been minimized.

Show comment Hide comment
@krestt

krestt Dec 30, 2014

You are the Man!! Thank you very much!

krestt commented Dec 30, 2014

You are the Man!! Thank you very much!

@prideloki

This comment has been minimized.

Show comment Hide comment
@prideloki

prideloki Dec 31, 2014

thank you

thank you

@benmathews1

This comment has been minimized.

Show comment Hide comment
@benmathews1

benmathews1 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!!!

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.

Show comment Hide comment
@ghost

ghost Jan 3, 2015

THANK YOU!

ghost commented Jan 3, 2015

THANK YOU!

@mctolentino

This comment has been minimized.

Show comment Hide comment
@mctolentino

mctolentino Jan 4, 2015

Works perfectly! Thanks for the workaround.

Works perfectly! Thanks for the workaround.

@trabulmonkee

This comment has been minimized.

Show comment Hide comment
@trabulmonkee

trabulmonkee 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.

@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.

Show comment Hide comment
@nagoshiashumari

nagoshiashumari Jan 6, 2015

Thank you for this. :+1

Thank you for this. :+1

@newbro

This comment has been minimized.

Show comment Hide comment
@newbro

newbro Jan 6, 2015

Another thank you from me :D

newbro commented Jan 6, 2015

Another thank you from me :D

@GeetaGh

This comment has been minimized.

Show comment Hide comment
@GeetaGh

GeetaGh Jan 6, 2015

Thank you..

GeetaGh commented Jan 6, 2015

Thank you..

@GeetaGh

This comment has been minimized.

Show comment Hide comment
@GeetaGh

GeetaGh 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.

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.

Show comment Hide comment
@DuongAnh

DuongAnh Jan 6, 2015

Thanks for your help ! PERFECT ^_^

DuongAnh commented Jan 6, 2015

Thanks for your help ! PERFECT ^_^

@bjbussell

This comment has been minimized.

Show comment Hide comment
@bjbussell

bjbussell Jan 6, 2015

Thanks!

Thanks!

@lostandfownd

This comment has been minimized.

Show comment Hide comment
@lostandfownd

lostandfownd Jan 7, 2015

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

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

@intuedge

This comment has been minimized.

Show comment Hide comment
@intuedge

intuedge 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.

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.

Show comment Hide comment
@neoalvaro

neoalvaro 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

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.

Show comment Hide comment
@mmm13

mmm13 Jan 8, 2015

Thanks! working now..

mmm13 commented Jan 8, 2015

Thanks! working now..

@MikaelSmith

This comment has been minimized.

Show comment Hide comment
@MikaelSmith

MikaelSmith Jan 8, 2015

Thank you so much for your work on this.

Thank you so much for your work on this.

@obiora22

This comment has been minimized.

Show comment Hide comment
@obiora22

obiora22 Jan 9, 2015

Awesome help. Thank you!!!

obiora22 commented Jan 9, 2015

Awesome help. Thank you!!!

@circleupx

This comment has been minimized.

Show comment Hide comment
@circleupx

circleupx Jan 10, 2015

Perfect 😄

Perfect 😄

@webdevilopers

This comment has been minimized.

Show comment Hide comment
@webdevilopers

webdevilopers Jan 10, 2015

👍

👍

@TobiasAxelsson

This comment has been minimized.

Show comment Hide comment
@TobiasAxelsson

TobiasAxelsson 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!

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.

Show comment Hide comment
@Limess

Limess Jan 11, 2015

Worked for me, thank you.

Limess commented Jan 11, 2015

Worked for me, thank you.

@dmitryvmin

This comment has been minimized.

Show comment Hide comment
@dmitryvmin

dmitryvmin Jan 13, 2015

Fixed. Thank you!

Fixed. Thank you!

@dniman

This comment has been minimized.

Show comment Hide comment
@dniman

dniman Jan 15, 2015

Great job! Thanks!

dniman commented Jan 15, 2015

Great job! Thanks!

@sterswift

This comment has been minimized.

Show comment Hide comment
@sterswift

sterswift Jan 15, 2015

thanks, man, you saved my ass

thanks, man, you saved my ass

@anicething

This comment has been minimized.

Show comment Hide comment
@anicething

anicething Jan 15, 2015

thans,man,you saved my ass

thans,man,you saved my ass

@webandmobilesoultion

This comment has been minimized.

Show comment Hide comment
@webandmobilesoultion

webandmobilesoultion 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 "

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.

Show comment Hide comment
@dongchen

dongchen Jan 19, 2015

Thank you. This worked for me.

Thank you. This worked for me.

@jfloff

This comment has been minimized.

Show comment Hide comment
@jfloff

jfloff Jan 20, 2015

👍

jfloff commented Jan 20, 2015

👍

@yubrajpokharel

This comment has been minimized.

Show comment Hide comment
@yubrajpokharel

yubrajpokharel Jan 21, 2015

thats great thanks a lot

thats great thanks a lot

@cfetty

This comment has been minimized.

Show comment Hide comment
@cfetty

cfetty 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

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.

Show comment Hide comment
@UdayKumarDas

UdayKumarDas Jan 22, 2015

Thank you very much, it's really helpfull

Thank you very much, it's really helpfull

@kyusufm

This comment has been minimized.

Show comment Hide comment
@kyusufm

kyusufm Jan 23, 2015

Thank you so much, it's really help.

kyusufm commented Jan 23, 2015

Thank you so much, it's really help.

@levserk

This comment has been minimized.

Show comment Hide comment
@levserk

levserk Jan 23, 2015

Thank you so much!

levserk commented Jan 23, 2015

Thank you so much!

@yaooluu

This comment has been minimized.

Show comment Hide comment
@yaooluu

yaooluu Jan 24, 2015

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

yaooluu commented Jan 24, 2015

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

@watersavvy

This comment has been minimized.

Show comment Hide comment
@watersavvy

watersavvy 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.

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.

Show comment Hide comment
@vike27

vike27 Jan 26, 2015

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

vike27 commented Jan 26, 2015

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

@alkinkasap

This comment has been minimized.

Show comment Hide comment
@alkinkasap

alkinkasap Jan 26, 2015

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

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

@stephendanner

This comment has been minimized.

Show comment Hide comment
@stephendanner

stephendanner Jan 27, 2015

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

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.

Show comment Hide comment
@fanian

fanian Jan 28, 2015

Amazing! Thanks for your participation!

fanian commented Jan 28, 2015

Amazing! Thanks for your participation!

@valgreen01

This comment has been minimized.

Show comment Hide comment
@valgreen01

valgreen01 Jan 28, 2015

Thanks a lot! it works 😀

Thanks a lot! it works 😀

@fikriauliya

This comment has been minimized.

Show comment Hide comment
@fikriauliya

fikriauliya Jan 29, 2015

Thanks it works 👍

Thanks it works 👍

@maximgatilin

This comment has been minimized.

Show comment Hide comment
@maximgatilin

maximgatilin Jan 29, 2015

Very helpful, thanks

Very helpful, thanks

@SleepWalker

This comment has been minimized.

Show comment Hide comment
@SleepWalker

SleepWalker Jan 30, 2015

Thanks a lot! rubygems-update worked for me

Thanks a lot! rubygems-update worked for me

@cobyasante

This comment has been minimized.

Show comment Hide comment
@cobyasante

cobyasante 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

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.

Show comment Hide comment
@aoeasif

aoeasif Jan 31, 2015

Thanks it's works fine. 😄 :

aoeasif commented Jan 31, 2015

Thanks it's works fine. 😄 :

@ifkas

This comment has been minimized.

Show comment Hide comment
@ifkas

ifkas Feb 1, 2015

Beautiful, works as a charm, thanks bunch!

ifkas commented Feb 1, 2015

Beautiful, works as a charm, thanks bunch!

@Landish

This comment has been minimized.

Show comment Hide comment
@Landish

Landish Feb 2, 2015

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

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.

Show comment Hide comment
@ShulinChen

ShulinChen 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

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.

Show comment Hide comment
@chebaby

chebaby Feb 3, 2015

thank you @luislavena, it works

chebaby commented Feb 3, 2015

thank you @luislavena, it works

@charlesuko

This comment has been minimized.

Show comment Hide comment
@charlesuko

charlesuko Feb 4, 2015

thanks so much. this worked perfectly

thanks so much. this worked perfectly

@rezadehganpour

This comment has been minimized.

Show comment Hide comment
@rezadehganpour

rezadehganpour 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!

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.

Show comment Hide comment
@anisabboud

anisabboud Feb 7, 2015

Thank you!

Thank you!

@KabbAmine

This comment has been minimized.

Show comment Hide comment
@KabbAmine

KabbAmine Feb 7, 2015

Thank you very much 😄

Thank you very much 😄

@kspurgin

This comment has been minimized.

Show comment Hide comment
@kspurgin

kspurgin Feb 9, 2015

++ thanks.

kspurgin commented Feb 9, 2015

++ thanks.

@MattForerunner

This comment has been minimized.

Show comment Hide comment
@MattForerunner

MattForerunner 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!

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.

Show comment Hide comment
@MattForerunner

MattForerunner Feb 9, 2015

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

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

@sweco-seprst

This comment has been minimized.

Show comment Hide comment
@sweco-seprst

sweco-seprst Feb 12, 2015

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

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

@prasanthkarukkuvel

This comment has been minimized.

Show comment Hide comment
@prasanthkarukkuvel

prasanthkarukkuvel Feb 12, 2015

Saved my day! Thank you 😊

Saved my day! Thank you 😊

@anilpanthi

This comment has been minimized.

Show comment Hide comment
@anilpanthi

anilpanthi Feb 13, 2015

thanks bro

thanks bro

@mrwhitney

This comment has been minimized.

Show comment Hide comment
@mrwhitney

mrwhitney 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

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.

Show comment Hide comment
@nipendar

nipendar Feb 15, 2015

Thank you...very nice explanation

Thank you...very nice explanation

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Feb 16, 2015

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

ghost commented Feb 16, 2015

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

@MickCreates

This comment has been minimized.

Show comment Hide comment
@MickCreates

MickCreates 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!

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.

Show comment Hide comment
@Sailaja13

Sailaja13 Feb 19, 2015

Thanks a lot!

Thanks a lot!

@Andrelton

This comment has been minimized.

Show comment Hide comment
@Andrelton

Andrelton Feb 19, 2015

THANK YOU!

THANK YOU!

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Feb 19, 2015

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

ghost commented Feb 19, 2015

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

@rashmibmanyam

This comment has been minimized.

Show comment Hide comment
@rashmibmanyam

rashmibmanyam Feb 20, 2015

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

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

@DerekFoulk

This comment has been minimized.

Show comment Hide comment
@DerekFoulk

DerekFoulk 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...

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.

Show comment Hide comment
@mawwerik

mawwerik Feb 20, 2015

Thanks for this excellent description...

Thanks for this excellent description...

@RomainBrunias

This comment has been minimized.

Show comment Hide comment
@RomainBrunias

RomainBrunias Feb 21, 2015

Thanks.

Thanks.

@harellevy

This comment has been minimized.

Show comment Hide comment
@harellevy

harellevy Feb 22, 2015

Thanks!!! that helped me!!

Thanks!!! that helped me!!

@akshitshah

This comment has been minimized.

Show comment Hide comment
@akshitshah

akshitshah Feb 23, 2015

helped!!! rockstar you are!!!

helped!!! rockstar you are!!!

@jansmolders86

This comment has been minimized.

Show comment Hide comment
@jansmolders86

jansmolders86 Feb 23, 2015

Thanks a bunch! 👍

Thanks a bunch! 👍

@diazemiliano

This comment has been minimized.

Show comment Hide comment
@diazemiliano

diazemiliano Feb 24, 2015

Thanks! 👌

Thanks! 👌

@dynamite-ready

This comment has been minimized.

Show comment Hide comment
@dynamite-ready

dynamite-ready Feb 24, 2015

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

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

@hpasweden

This comment has been minimized.

Show comment Hide comment
@hpasweden

hpasweden Feb 24, 2015

Works fine! thx

Works fine! thx

@ben-rubin

This comment has been minimized.

Show comment Hide comment
@ben-rubin

ben-rubin Feb 25, 2015

Thank you!

Thank you!

@SHenry77

This comment has been minimized.

Show comment Hide comment
@SHenry77

SHenry77 Feb 25, 2015

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

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

@abdullahnaseer

This comment has been minimized.

Show comment Hide comment
@abdullahnaseer

abdullahnaseer Feb 25, 2015

Thank you!

Thank you!

@purduekenny

This comment has been minimized.

Show comment Hide comment
@purduekenny

purduekenny Feb 25, 2015

You're the best.

You're the best.

@satphonix

This comment has been minimized.

Show comment Hide comment
@satphonix

satphonix Feb 26, 2015

Thanks, it works!

Thanks, it works!

@rezwan-hossain

This comment has been minimized.

Show comment Hide comment
@rezwan-hossain

rezwan-hossain Feb 27, 2015

thank u its work

thank u its work

@wellxion

This comment has been minimized.

Show comment Hide comment
@wellxion

wellxion Mar 2, 2015

thx a lot. It's useful

wellxion commented Mar 2, 2015

thx a lot. It's useful

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Mar 3, 2015

+1 +1

ghost commented Mar 3, 2015

+1 +1

@lenazh

This comment has been minimized.

Show comment Hide comment
@lenazh

lenazh Mar 3, 2015

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

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.

Show comment Hide comment
@acaparrelli

acaparrelli Mar 3, 2015

thank you man!

thank you man!

@mohamedahmed3ali

This comment has been minimized.

Show comment Hide comment
@mohamedahmed3ali

mohamedahmed3ali Mar 4, 2015

Thanks so much

Thanks so much

@server102

This comment has been minimized.

Show comment Hide comment
@server102

server102 Mar 4, 2015

+1... Thanks alot

+1... Thanks alot

@davewallace

This comment has been minimized.

Show comment Hide comment
@davewallace

davewallace Mar 4, 2015

+1 much appreciated.

+1 much appreciated.

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Mar 4, 2015

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

ghost commented Mar 4, 2015

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

@HACKVTT

This comment has been minimized.

Show comment Hide comment
@HACKVTT

HACKVTT Mar 4, 2015

Thanks, It's work for me (y)

HACKVTT commented Mar 4, 2015

Thanks, It's work for me (y)

@vegas0250

This comment has been minimized.

Show comment Hide comment
@vegas0250

vegas0250 Mar 4, 2015

Thanks.

Thanks.

@richpeck

This comment has been minimized.

Show comment Hide comment
@richpeck

richpeck Mar 4, 2015

Thank you so much - worked a treat

richpeck commented Mar 4, 2015

Thank you so much - worked a treat

@chesiljuanich

This comment has been minimized.

Show comment Hide comment
@chesiljuanich

chesiljuanich Mar 5, 2015

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

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

@widiarifki

This comment has been minimized.

Show comment Hide comment
@widiarifki

widiarifki Mar 5, 2015

yep, it works.

yep, it works.

@Kcko

This comment has been minimized.

Show comment Hide comment
@Kcko

Kcko Mar 5, 2015

Its work 4 me. Thanx for sharing!

Kcko commented Mar 5, 2015

Its work 4 me. Thanx for sharing!

@pzurawski83

This comment has been minimized.

Show comment Hide comment
@pzurawski83

pzurawski83 Mar 6, 2015

awsome!!! thanks a lot

awsome!!! thanks a lot

@mtrojanowski

This comment has been minimized.

Show comment Hide comment
@mtrojanowski

mtrojanowski Mar 7, 2015

Thanks! 👍

Thanks! 👍

@thomthom

This comment has been minimized.

Show comment Hide comment
@thomthom

thomthom Mar 7, 2015

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

thomthom commented Mar 7, 2015

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

@brunabxs

This comment has been minimized.

Show comment Hide comment
@brunabxs

brunabxs Mar 7, 2015

Thanks a lot!

brunabxs commented Mar 7, 2015

Thanks a lot!

@vlrprbttst

This comment has been minimized.

Show comment Hide comment
@vlrprbttst

vlrprbttst Mar 8, 2015

thaaaaaaaaanks

thaaaaaaaaanks

@euccas

This comment has been minimized.

Show comment Hide comment
@euccas

euccas Mar 10, 2015

works perfectly. +1 thanks.

euccas commented Mar 10, 2015

works perfectly. +1 thanks.

@saaqibz

This comment has been minimized.

Show comment Hide comment
@saaqibz

saaqibz Mar 11, 2015

worked like a charm. Thanks

saaqibz commented Mar 11, 2015

worked like a charm. Thanks

@ptulip

This comment has been minimized.

Show comment Hide comment
@ptulip

ptulip 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

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.

Show comment Hide comment
@devhut

devhut Mar 13, 2015

luis for president!

devhut commented Mar 13, 2015

luis for president!

@andersondsl

This comment has been minimized.

Show comment Hide comment
@andersondsl

andersondsl Mar 16, 2015

Still Working!!! Thanks luislavena

Still Working!!! Thanks luislavena

@rbtsolis

This comment has been minimized.

Show comment Hide comment
@rbtsolis

rbtsolis Mar 18, 2015

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

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

@mikerentas

This comment has been minimized.

Show comment Hide comment
@mikerentas

mikerentas Mar 18, 2015

Thank you! Excellent walkthrough, and it worked perfectly!

Thank you! Excellent walkthrough, and it worked perfectly!

@KodernPl

This comment has been minimized.

Show comment Hide comment
@KodernPl

KodernPl Mar 18, 2015

Updating gems 2.2.2 worked for me. Thank you

Updating gems 2.2.2 worked for me. Thank you

@nathanvda

This comment has been minimized.

Show comment Hide comment
@nathanvda

nathanvda 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.

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.

Show comment Hide comment
@helloncanella

helloncanella Mar 20, 2015

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

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

@thetypebeast

This comment has been minimized.

Show comment Hide comment
@thetypebeast

thetypebeast 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

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.

Show comment Hide comment
@phongkien

phongkien Mar 25, 2015

very nice, thanks!

very nice, thanks!

@logos9000

This comment has been minimized.

Show comment Hide comment
@logos9000

logos9000 Mar 25, 2015

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

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

@vongoh

This comment has been minimized.

Show comment Hide comment
@vongoh

vongoh 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

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.

Show comment Hide comment
@maxpower720

maxpower720 Mar 25, 2015

Thanks! That did the trick!

Thanks! That did the trick!

@DeeBaker

This comment has been minimized.

Show comment Hide comment
@DeeBaker

DeeBaker Mar 27, 2015

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

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

@TheNaoX

This comment has been minimized.

Show comment Hide comment
@TheNaoX

TheNaoX Mar 28, 2015

¡A huevo! 👍
Thank you so much!

TheNaoX commented Mar 28, 2015

¡A huevo! 👍
Thank you so much!

@alecperkey

This comment has been minimized.

Show comment Hide comment
@alecperkey

alecperkey 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

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.

Show comment Hide comment
@JimiofEden

JimiofEden 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

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.

Show comment Hide comment
@wilfred05777

wilfred05777 Apr 1, 2015

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

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

@jumpluff

This comment has been minimized.

Show comment Hide comment
@jumpluff

jumpluff Apr 5, 2015

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

jumpluff commented Apr 5, 2015

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

@JTallis

This comment has been minimized.

Show comment Hide comment
@JTallis

JTallis Apr 9, 2015

Amazing, thanks!

JTallis commented Apr 9, 2015

Amazing, thanks!

@bk2git

This comment has been minimized.

Show comment Hide comment
@bk2git

bk2git 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.

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.

Show comment Hide comment
@kevinarrieta

kevinarrieta Apr 11, 2015

Thanks!

Thanks!

@mikebsg01

This comment has been minimized.

Show comment Hide comment
@mikebsg01

mikebsg01 Apr 13, 2015

Eres la leche amigo! Muchas Gracias 😃

Eres la leche amigo! Muchas Gracias 😃

@stickerboy

This comment has been minimized.

Show comment Hide comment
@stickerboy

stickerboy Apr 13, 2015

Great write up, thanks! :)

Great write up, thanks! :)

@bk2git

This comment has been minimized.

Show comment Hide comment
@bk2git

bk2git 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)".

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.

Show comment Hide comment
@Mikey-Lee

Mikey-Lee Apr 17, 2015

nice one !

nice one !

@meysammeisam

This comment has been minimized.

Show comment Hide comment
@meysammeisam

meysammeisam 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"
...

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.

Show comment Hide comment
@iconcells

iconcells 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.

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.

Show comment Hide comment
@mlb5000

mlb5000 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 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.

Show comment Hide comment
@mlb5000

mlb5000 Apr 27, 2015

Same problem with 2.1.6 32-bit.

mlb5000 commented Apr 27, 2015

Same problem with 2.1.6 32-bit.

@osdk

This comment has been minimized.

Show comment Hide comment
@osdk

osdk Apr 29, 2015

It solved my problem... thanks

osdk commented Apr 29, 2015

It solved my problem... thanks

@MattCordell

This comment has been minimized.

Show comment Hide comment
@MattCordell

MattCordell May 2, 2015

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

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

@BahiHussein

This comment has been minimized.

Show comment Hide comment
@BahiHussein

BahiHussein May 2, 2015

Thank You. saved my day

Thank You. saved my day

@bk2git

This comment has been minimized.

Show comment Hide comment
@bk2git

bk2git 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.

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.

Show comment Hide comment
@gaurav-lad

gaurav-lad May 11, 2015

Thank you. luislavena

Thank you. luislavena

@raoprashanth007

This comment has been minimized.

Show comment Hide comment
@raoprashanth007

raoprashanth007 May 11, 2015

Thanks, It worked for me too

Thanks, It worked for me too

@StevenBR

This comment has been minimized.

Show comment Hide comment
@StevenBR

StevenBR May 12, 2015

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

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

@flightofthunder

This comment has been minimized.

Show comment Hide comment
@flightofthunder

flightofthunder May 13, 2015

Worked on Windows 7 64-bit. Fantastic, thank you very much

Worked on Windows 7 64-bit. Fantastic, thank you very much

@saske505

This comment has been minimized.

Show comment Hide comment
@saske505

saske505 May 16, 2015

Thanks you so much, windows 7 32bit

Thanks you so much, windows 7 32bit

@TomDeFrank

This comment has been minimized.

Show comment Hide comment
@TomDeFrank

TomDeFrank May 17, 2015

Windows 8.fix not working.
.pem file wad already present in ssl folder

Windows 8.fix not working.
.pem file wad already present in ssl folder

@varundmishra

This comment has been minimized.

Show comment Hide comment
@varundmishra

varundmishra May 19, 2015

@TomDeFrank : You are right, the fix ain't working for Windows 8.1 64 bit (Ruby 2.2.x)
Try uninstalling 2.2.x and install 2.1.6 (32 bit) with relevant DevKit, works for me.

@TomDeFrank : You are right, the fix ain't working for Windows 8.1 64 bit (Ruby 2.2.x)
Try uninstalling 2.2.x and install 2.1.6 (32 bit) with relevant DevKit, works for me.

@nollenr

This comment has been minimized.

Show comment Hide comment
@nollenr

nollenr May 20, 2015

Fix not working for Linux (Centos 2.6.32-504.16.2.el6.i686)
[root@renoir ssl_certs]# ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [i686-linux]
[root@renoir ssl_certs]# gem -v
2.4.7

AddTrustExternalCARoot-2048.pem is current and matches

nollenr commented May 20, 2015

Fix not working for Linux (Centos 2.6.32-504.16.2.el6.i686)
[root@renoir ssl_certs]# ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [i686-linux]
[root@renoir ssl_certs]# gem -v
2.4.7

AddTrustExternalCARoot-2048.pem is current and matches

@linf2

This comment has been minimized.

Show comment Hide comment
@linf2

linf2 May 23, 2015

Omg thank you.

linf2 commented May 23, 2015

Omg thank you.

@moicarolyn

This comment has been minimized.

Show comment Hide comment
@moicarolyn

moicarolyn May 27, 2015

Thank you!!!!

Thank you!!!!

@DenisLemos

This comment has been minimized.

Show comment Hide comment
@DenisLemos

DenisLemos May 28, 2015

Thank you sir. You are a gentlemen and a scholar ಠ_ರೃ

Thank you sir. You are a gentlemen and a scholar ಠ_ರೃ

@fernandoGN

This comment has been minimized.

Show comment Hide comment
@fernandoGN

fernandoGN May 28, 2015

In my case the solution was to use the proxy:

gem install --http-proxy http://ip:port jekyll

In my case the solution was to use the proxy:

gem install --http-proxy http://ip:port jekyll
@patrickst1

This comment has been minimized.

Show comment Hide comment
@patrickst1

patrickst1 Jun 3, 2015

Excellent, Thank you!!

Excellent, Thank you!!

@Bela2711

This comment has been minimized.

Show comment Hide comment
@Bela2711

Bela2711 Jun 6, 2015

Thanks, it helped! :)

Bela2711 commented Jun 6, 2015

Thanks, it helped! :)

@abbondanza

This comment has been minimized.

Show comment Hide comment
@abbondanza

abbondanza Jun 9, 2015

Great stuff! Truly helpful.. Will share with others where I work

Great stuff! Truly helpful.. Will share with others where I work

@Visionaire

This comment has been minimized.

Show comment Hide comment
@Visionaire

Visionaire Jun 10, 2015

Thank you, that was helpfull and right to the point! 😊

Thank you, that was helpfull and right to the point! 😊

@prinok7

This comment has been minimized.

Show comment Hide comment
@prinok7

prinok7 Jun 14, 2015

Respect Man! you really are one BIG Gem of a guru! it worked !!! been labouring for days now,until you showed up.thanks a million.keep up the good work and more gems to your fingers and brain!

prinok7 commented Jun 14, 2015

Respect Man! you really are one BIG Gem of a guru! it worked !!! been labouring for days now,until you showed up.thanks a million.keep up the good work and more gems to your fingers and brain!

@wyrdathru

This comment has been minimized.

Show comment Hide comment
@wyrdathru

wyrdathru Jun 17, 2015

For those having issues on Windows 8.1 64-bit, try https://gist.github.com/fnichol/867550.

You'll need to uninstall Ruby 2.2 (or whatever) from Control Panel and download the RailsInstaller package, then follow the steps outlined.

Make sure you add your environment variable, not just use 'set' from the command line.

For those having issues on Windows 8.1 64-bit, try https://gist.github.com/fnichol/867550.

You'll need to uninstall Ruby 2.2 (or whatever) from Control Panel and download the RailsInstaller package, then follow the steps outlined.

Make sure you add your environment variable, not just use 'set' from the command line.

@dapperAuteur

This comment has been minimized.

Show comment Hide comment
@dapperAuteur

dapperAuteur Jun 18, 2015

you're my new favorite developer. I wonder what your rookie card is worth!?

you're my new favorite developer. I wonder what your rookie card is worth!?

@ArsenalofCode

This comment has been minimized.

Show comment Hide comment
@ArsenalofCode

ArsenalofCode Jun 20, 2015

you are possibly the greatest human i have ever encountered on the internet world.

thank you.

you are possibly the greatest human i have ever encountered on the internet world.

thank you.

@evanweking

This comment has been minimized.

Show comment Hide comment
@evanweking

evanweking Jun 24, 2015

thanks you very much,,, one more thing,, is installing gems rails is taking a long time or not?? thank you

thanks you very much,,, one more thing,, is installing gems rails is taking a long time or not?? thank you