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)

Attachments: http://www.ruby-forum.com/attachment/11115/Untitled1.png

The typical cause of this issue is something that makes an SSL connection to rubygems.org fail. It’s hard to say more without additional information: your copy of Ruby may have been installed without OpenSSL, the certificate that issued the one used by Rubygems.org may not be trusted by your machine, a proxy server along the way could be misconfigured.

–Matt Jones