Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# initializers/bypass_openssl_verification.rb
require 'openssl'
# Ruby 1.9.3:
if Rails.env.development?
OpenSSL::SSL.send(:remove_const, :VERIFY_PEER)
OpenSSL::SSL.const_set(:VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE)
end
# Ruby > 2.x
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE if Rails.env.development?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.