I was updating our half-decade old ruby on rails app (Rails 5.2) & faced the exact similar problem. The correct approach to solve this was to add gem 'net/http'
to the bundle file. We can't update nor discard net/protocol gem as it is being used by net-imap, net-pop, net-smtp. (bundle info net-protocol
). Adding net/http solves the issue for ruby version 2.7.3.