2

I was trying to install compass on my OS X terminal using the following command:

sudo gem install compass

but an error prompt:

ERROR:  Could not find a valid gem 'compass' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Connection refused - Connection refused (https://rubygems.org/latest_specs.4.8.gz) ERROR:  Possible alternatives: compass

What's causing this?

I then googled and found the same issue here:

Errno::ECONNREFUSED No connection could be made because

But I don't understand how the following command can resolve the issue:

Try to use environment variables to set the proxies:
export http_proxy="http://user:pass@server.com:port"
export HTTP_PROXY="http://user:pass@server.com:port"

I am only installing compass on my localhost. What should the USER, PASS, and @SERVER be replaced with? Thank you in advance

vishnu
  • 730
  • 2
  • 6
  • 26

1 Answers1

2

I have successfully installed compass now after fixing my proxy via this link:

http://www.cyberciti.biz/faq/linux-unix-set-proxy-environment-variable/

Basically I just did the following commands on the terminal:

$ export http_proxy=http://server-ip:port/
$ export http_proxy=http://127.0.0.1:3128/
vishnu
  • 730
  • 2
  • 6
  • 26