1

I have installed ruby2.0.0-p598-x64 and I've also unpacked DevKit-mingw64-64-4.7.2-20130224-1432-sfx_2.

but when I give gem install json --platform=ruby in cmd it says

could not find a valid gem 'json' (>=0)

here is why:

Unable to download data from https://rybtgems.org/-SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/latest_specs.4.8.gz)

How can I solve this?

1 Answers1

0

If you want to fix for this session;

gem install xxxx --source=http://rubygems.org

If you want to fix for always, it's depend on your OS. This error is normaly on Windows.

Windows way;

1) Download this file : cacert.pem (Right click and save as)

2) Go to the system proprieties (Windows + Break), Advanced system proprieties (left sidebar), environment variable, and add new for your user.

3) Name : SSL_CERT_FILE and Value : X:\XXXX\cacert.pem

4)Restart your command prompt.

Linux/Mac (not tested);

Force HTTPS : sudo gem sources -a http://rubygems.org

Félix Desjardins
  • 3,223
  • 3
  • 21
  • 36