ERROR: While executing gem (Errno::ECONNREFUSED) Connection refused - recvfrom(2)

Hello I’m trying to install bundler using this command

gem install bundler

Once i run the command this comes out

ERROR: While executing gem … (Errno::ECONNREFUSED)
Connection refused - recvfrom(2)