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




Wednesday, May 24, 2017

Tuesday, April 25, 2017

Changing gem source to without https

$ gem sources --add http://rubygems.org
$ gem sources --remove https://rubygems.org
$ gem sources --list

*** CURRENT SOURCES ***
http://rubygems.org

Installing curb on windows

Installing curb (0.7.18) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

1) Download libcurl (under the “Win32 - Generic” section) and extract the contents to C:\ At the time of writing 7.27.0 was the latest. If you download a different version, don’t forget to the update the paths below.
2) Add C:\curl-7.27.0-devel-mingw32\bin to your Windows path
3) Run:

Note :If you can't build using win32 version on your 64bit windows, try 64 bit instead.. Working at 6/8/2020 using 64 bit  curl-7.70.0-win64-mingw

gem install curb --version 0.7.18 -- --with-curl-dir="C:/curl-7.70.0-win64-mingw"

Note : You've to choose SSH Version
Win32 7zip7.54.0binarySSLSSHViktor Szakáts
gem install curb --version 0.7.18 --platform=ruby -- -- --with-curl-lib="C:/curl-7.27.0-devel-mingw32/bin" --with-curl-include="C:/curl-7.27.0-devel-mingw32/include"
If you're getting curb windows %1 is not a valid Win32 application, copy libcurl.dll to C:\Bitnami\rubystack-2.0.0-18\ruby\bin 
then restart the computer