Install cacert.pem to use SSL calls
Windows
- 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.
- Go to your Computer -> Advanced Settings -> Environment Variables
- Create a new System Variable:
- Variable: SSL_CERT_FILE Value: C:\RailsInstaller\cacert.pem
- Close all your command prompts, including your Rails server command prompt, etc.
- 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