How To Resolve SSL_connect ERROR When Install Ruby Gems on Windows


This quick tip is going to help you troubleshoot when installing Ruby gems on a Windows environment. It’s a common consensus that Ruby doesn’t play well under Windows environment but Ruby as a programming language itself, do support running in Windows. The myth that Ruby doesn’t work well in Windows was mostly due to many popular gems under its platform simply isn’t designed to run under Windows environment.

Regardless of what you are trying to do with Ruby and its thousands gems, if you are getting error when installing compatible gems under Windows environment this will help you to troubleshoot.


Example Windows Failed to Install compass gem

If you are trying to run the following command, assuming you have Ruby already installed.

gem install compass

This is due to the OpenSSL doesn’t support v3 on Windows, and you can resolve this issue by adding an alternative gem source without the https prefix.

gem source –a


Will add the none SSL URL to the gem source. It will prompt you if you want to add this insecure source, answer y to confirm. Now run the command again gem install will successfully install the the gem from a none SSL source. If you are getting warning on any dependencies like below:

You can update all the dependencies gems to pull from none SSL source by the follow command

gem update –system –source


At the end all your system gems will be updated from a none secure source.

Hope this guide helped you with any issues on installing Ruby gems under Windows environment. As for all other platforms, some of the method would still be valid if the root cause are the same.



Please enter your comment!
Please enter your name here