0

Getting below errors while installing Ruby

1. C:\Ruby21\DevKit>gem install rails  

ERROR:  Could not find a valid gem 'rails' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://api.rubygems.org/latest_specs.4.8.gz)

2. C:\Ruby21\DevKit>gem install rails --include-dependencies  

ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: --include-dependencies

Please help.

Deepak Negi
  • 214
  • 4
  • 11

1 Answers1

4

Are you running Windows? I had this problem and followed the steps here for Windows:

https://stackoverflow.com/a/19151697/4378291

You need to download this certificate file, browse to your ruby installation directory and copy it to ..lib/ruby/"your ruby version"/rubygems/ssl_certs/

If you have troubles downloading it like I did, you can just create a file named AddTrustExternalCARoot-2048.pem and copy the contents of the certificate file in your browser to the file you created.

Make sure to save with the extension to .pem and allow windows to change it.

Community
  • 1
  • 1
C. Gibney
  • 56
  • 5