Wednesday, May 31, 2017

Install cacert.pem to use SSL calls

Windows

  1. Download https://curl.haxx.se/ca/cacert.pem into c:\railsinstaller\cacert.pem. Make sure you save it as a .pem file, rather than a text file.
  2. Go to your Computer -> Advanced Settings -> Environment Variables
  3. Create a new System Variable:
  4. Variable: SSL_CERT_FILE Value: C:\RailsInstaller\cacert.pem
  5. Close all your command prompts, including your Rails server command prompt, etc.
  6. Start a new ruby irb prompt, and try the following:
  • $irb>require 'open-uri'
  • $irb>open('https://www.gmail.com')

Linux




No comments:

Post a Comment