◯警告文
/Users/tagami/.rbenv/versions/2.7.7/lib/ruby/2.7.0/net/protocol.rb:66: warning: already initialized constant Net::ProtocRetryError
/Users/tagami/.rbenv/versions/2.7.7/lib/ruby/gems/2.7.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:68: warning: previous definition of ProtocRetryError was here
/Users/tagami/.rbenv/versions/2.7.7/lib/ruby/2.7.0/net/protocol.rb:206: warning: already initialized constant Net::BufferedIO::BUFSIZE
/Users/tagami/.rbenv/versions/2.7.7/lib/ruby/gems/2.7.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:214: warning: previous definition of BUFSIZE was here
/Users/tagami/.rbenv/versions/2.7.7/lib/ruby/2.7.0/net/protocol.rb:503: warning: already initialized constant Net::NetPrivate::Socket
/Users/tagami/.rbenv/versions/2.7.7/lib/ruby/gems/2.7.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:541: warning: previous definition of Socket was here
rails server実行時の警告文
◯警告文 /Users/tagami/.rbenv/versions/2.7.7/lib/ruby/2.7.0/net/protocol.rb:66: warning: already initialized constant Net::ProtocRetryError /Users/tagami/.rbenv/versions/2.7.7/lib/ruby/gems/2.7.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:68: warning: previous definition of ProtocRetryError was here /Users/tagami/.rbenv/versions/2.7.7/lib/ruby/2.7.0/net/protocol.rb:206: warning: already initialized constant Net::BufferedIO::BUFSIZE /Users/tagami/.rbenv/versions/2.7.7/lib/ruby/gems/2.7.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:214: warning: previous definition of BUFSIZE was here /Users/tagami/.rbenv/versions/2.7.7/lib/ruby/2.7.0/net/protocol.rb:503: warning: already initialized constant Net::NetPrivate::Socket /Users/tagami/.rbenv/versions/2.7.7/lib/ruby/gems/2.7.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:541: warning: previous definition of Socket was here
◯原因 net-httpのStdlibバージョン読み込み後、gemバージョンを読み込み、定数を再定義していることに対して警告文が表示されていた。
◯解決方法 Gemfileに「gem 'net-http'」を追記
◯参考サイト https://zenn.dev/be_the_light/articles/8d8951f6596528