When I try to start the server I get the following warning:
/Users/sumitkalra1984/MVP/config/initializers/devise.rb:5: warning: already initialized constant VERIFY_PEER
My devise file:
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE if Rails.env.development?
How do I find where the constant is already defined, and how do I overwrite that definition?
While I cannot find where else the constant is initialized, you can silence the warning by wrapping that line in a silence_warnings block.
silence_warnings do
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE unless Rails.env.production?
end
See: http://api.rubyonrails.org/classes/Kernel.html#method-i-silence_warnings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With