How to tell gem command not to use SSL
ruby, rubygems, ssl
Solution
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.
Problem
I am trying to run the `gem` command to install/update some gems, but due to some network restrictions in this area, I get this error: ``` ERROR: While executing gem ... (OpenSSL::SSL::SSLError) SSL_connect returned=6 errno=0 state=SSLv3 read finished A ``` (I think) this is mainly because of tampering with the SSL certificates. Is there anyway to tell `gem` not to use `SSL`, to avoid the error?