Skip to content

Instantly share code, notes, and snippets.

@bagwanpankaj
Last active May 10, 2021 00:56
Show Gist options
  • Save bagwanpankaj/ab5a43a633009b4e2ba2 to your computer and use it in GitHub Desktop.
Save bagwanpankaj/ab5a43a633009b4e2ba2 to your computer and use it in GitHub Desktop.
This gist addresses some issue identified on Windows with Rails Installer
## RubyGems SSL Error
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
This error is actually produced by changes on rubygems site certificate in lieu of recent OpenSSL vulnerabilities.
To fix this error one need to upgrade their rubygems
### Specific problem with RubyGems
RubyGems bundles its trust certificate within itself (as it is used from command line tool),
where some OS does not able to verify the identity of them.
Recently CA for RubyGems.Org has changed, thus changing the certificate. Because
of this existing installation of rubygems has to be upgraded. In case of windows
since most people use [RailsInstaller](http://railsinstaller.org) it is still
distributed with old rubygems.Leaving RubyGems 2.4 is broken on Windows.
Once official releases are out, installation might be simpler. In the
meantime, please proceed using the instructions described below.
### Installing using update packages
1.) Find RubyGems version by running `gem -v`
2.) Download `rubygems-update-X.Y.Z.gem` (find the version higher than your current version)
You can find download links at GitHub under
[Releases](https://github.com/rubygems/rubygems/releases).
version for the version of RubyGems you need to update:
- Running 1.8.x: download [1.8.30](https://github.com/rubygems/rubygems/releases/tag/v1.8.30)
- Running 2.0.x: donwload [2.0.15](https://github.com/rubygems/rubygems/releases/tag/v2.0.15)
- Running 2.2.x: download [2.2.3](https://github.com/rubygems/rubygems/releases/tag/v2.2.3)
Please move file out of Downloads/ folder to somewhere you can later point out
3.) Install gem locally (by running below specified command)
```
C:\> gem install --local C:\rubygems-update-1.8.30.gem
C:\> update_rubygems --no-ri --no-rdoc
```
4.) After this check gems version `gem -v`. This should be updated version
5.) You could now uninstall `rubygems-update`
```
C:\>gem uninstall rubygems-update -x
Removing update_rubygems
Successfully uninstalled rubygems-update-2.2.3
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment