1

I need help with this error messages shows when i am trying to start my Ruby on Rails 7 server or console, doesnt affect functionality but its annoying, I am also using Chruby 2.7.5 because server is running on this version compared to my default Ruby version.

/home/ubuntu20/.rubies/ruby-2.7.5/lib/ruby/2.7.0/net/protocol.rb:66: warning: already initialized constant Net::ProtocRetryError
/home/ubuntu20/.gem/ruby/2.7.5/gems/net-protocol-0.1.2/lib/net/protocol.rb:68: warning: previous definition of ProtocRetryError was here
/home/ubuntu20/.rubies/ruby-2.7.5/lib/ruby/2.7.0/net/protocol.rb:206: warning: already initialized constant Net::BufferedIO::BUFSIZE
/home/ubuntu20/.gem/ruby/2.7.5/gems/net-protocol-0.1.2/lib/net/protocol.rb:208: warning: previous definition of BUFSIZE was here
/home/ubuntu20/.rubies/ruby-2.7.5/lib/ruby/2.7.0/net/protocol.rb:503: warning: already initialized constant Net::NetPrivate::Socket
/home/ubuntu20/.gem/ruby/2.7.5/gems/net-protocol-0.1.2/lib/net/protocol.rb:504: warning: previous definition of Socket was here
Loading development environment (Rails 7.0.2.3)

Thanks for help or tips

Tara
  • 75
  • 6
  • looks like the gems are installed in both places /home/ubuntu20/.rubies/ and /home/ubuntu20/.gem/ruby/ It has to do something like rvm is not installed properly with path.. try to troubleshoot rvm setup and you will be good. – uday Apr 28 '22 at 13:25

1 Answers1

1

It's a known problem (https://github.com/ruby/net-protocol/issues/10)

The solution that seems to work is to force-add net-http

bundle add net-http silenced this for me. Hope it helps.

Merovex
  • 921
  • 9
  • 10