This is the way to get rid of ‘nil.tmp_dh_callback=’ bug by using Rails plugin. Whenever they fix this in rubyforge gem – simply remove the plugin directory from vendor/plugins.
mkdir rubyforge_patch
cd rubyforge_patch
mate init.rb
Paste this into init.rb
class Net::HTTP
def use_ssl= flag
self.old_use_ssl = flag
@ssl_context.tmp_dh_callback = proc {} if flag
end
end if Net::HTTP.public_instance_methods.include? "old_use_ssl="
That’s it. You’re good to go. No more nil.tmp_dh_callback error.
Thanks! This saved me some headaches tonight.
Minor nits on the instructions: 1) remove the ‘s’ in vendors and 2) add a “cd rubyforge_patch” cmd after the mkdir command.
Thanks again! Very helpful.
Thanks for comment! Fixed.
Thanks really works, no more headaches.
Great patch. Thanks.
An alternate place to put the code would be in config/initializer/rubyforge_patch.rb.