VocabReminder
Easily build a great vocabulary without studying! Now on the App Store!
Click here for more info about the app

Turn Off SSL Verification In Ruby

       

The following code will disable SSL verification when using Open SSL.

OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

It is probably not a good idea to do this in production. But if you are just testing on your development machine it might come in handy.

You can add this to your Rails project in development environment like so...

# Add to config/application.rb
if Rails.env.development?
    OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
end
Tagged w/ #rails #security #open ssl #debugging