Skip to content

Instantly share code, notes, and snippets.

@ttringas
Created January 23, 2013 19:40
Show Gist options
  • Save ttringas/4612060 to your computer and use it in GitHub Desktop.
Save ttringas/4612060 to your computer and use it in GitHub Desktop.
Fix for Shopify Faraday SSL error: https://gist.github.com/4208432
# wget http://curl.haxx.se/ca/cacert.pem into lib first
require 'open-uri'
require 'net/https'
module Net
class HTTP
alias_method :original_use_ssl=, :use_ssl=
def use_ssl=(flag)
self.ca_file = Rails.root.join('lib/ca-bundle.crt').to_s
self.verify_mode = OpenSSL::SSL::VERIFY_PEER
self.original_use_ssl = flag
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment