How to tell gem command not to use SSL

Use HTTP instead of HTTPS if you are unable to solve the certs issue:

$ gem install rails --source http://rubygems.org

To avoid repeating this every time, either edit your ~/.gemrc or edit the file through the command line, like this:

$ gem sources --add http://rubygems.org
$ gem sources --remove https://rubygems.org
$ gem sources --list

*** CURRENT SOURCES ***
http://rubygems.org

Also, en every Gemfile you will need to change the first line from:

source 'https://rubygems.org'

To:

source 'http://rubygems.org'

Of course it would be much better if you manage to solve the certs issue as @p11y suggested on his comment.


The accepted answer didn't work for me. The following, however, did.

Edit .gemrc file

  • On Windows c:\Users\yourusername\.gemrc

Specifically %HOMEPATH% in the event your path is different.

  • Thanks goes out to @AaronChristiansen for pointing this out.

add:

:ssl_verify_mode: 0

It displayed the SSL errors but the install was successful.