Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Fix for Ruby's inability to properly validate SSL certs on Ubuntu

View ssl.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
if Rails.env == 'production' or Rails.env == 'staging'
require 'open-uri'
require 'net/https'
module Net
class HTTP
alias_method :original_use_ssl=, :use_ssl=
 
def use_ssl=(flag)
self.ca_file = '/etc/ssl/certs/ca-certificates.crt'
self.verify_mode = OpenSSL::SSL::VERIFY_PEER
self.original_use_ssl = flag
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.