21

I have installed Ruby on my system, and now I want to install Compass. But when I execute the gem install compass command, it shows an error like this:

could not find valid gem 'compass' <>=0> in any repositary

And also:

SocketError: getadressinfo: no such host is known.<http://rubygems.org/latest_specs.4.8.gz>

I don't know what the problem is. If I run ruby -v, it shows the Ruby version. So what's the problem with installing Compass?

Can anyone explain this to me properly? I've searched Google, but all I could find was some proxy problem - and I couldn't understand how to set the proxy at all.

I'm using Windows and a company internet connection, so I don't know the username and password of my proxy.

hopper
  • 13,060
  • 7
  • 49
  • 53
hsnGunda
  • 347
  • 1
  • 5
  • 20

7 Answers7

10

I was behind a proxy and HumberFrench's solution above helped:

Go to Ruby bin folder:

cd c:/Ruby193/bin

And then install compass gem:

gem install compass --http-proxy http://<proxy_adreess>:<port_of_proxy>

Another tip: am on Aptana Studio, so this could be run from within Aptana's terminal.

Cant up-vote so adding this here.

Shiyaz
  • 488
  • 5
  • 16
6

I had the same problem, finally solved it manually. Goto the rubygems compass page, and download the gem by clicking the Download link. Scroll down and you will see three Runtime Dependencies. Goto each of them and download those gems also. Put all of them in a directory, and try

gem install downloaded_compass_filename

This should solve your problem. If it gives an repository not found error message, you can force gem to try local files through the gem --local install option

anoopr
  • 121
  • 2
  • 2
4

if you use a proxy, and get error, do it

gem install compass --http-proxy http://<proxy_adreess>:<port_of_proxy>

gem install -h gives you a lor of options

3

The proxy is the most likely cause. You will have to get permission from the network admin, or manually download compass. For more info, See this SA post.

If you decide to go the manual route here is a link to the RubyGems compass page. This not ideal, but also better than having to write css without compass magic ^^

Good luck!

Community
  • 1
  • 1
Nick Tomlin
  • 28,402
  • 11
  • 61
  • 90
  • no use, i tried gem install --http-proxy http://localhost:8080 compass but same error.. pls some one give solution. – hsnGunda Dec 11 '12 at 06:15
  • It sounds like there is an issue with your ENV. Have you tried setting the proxy configuration in your gem.bat file, instead of directly on the command line? – Nick Tomlin Dec 11 '12 at 14:46
  • Can u tel me how to set proxy configuration in gem bat file – hsnGunda Dec 12 '12 at 07:10
3

On windows i had a few instalations of ruby:

    C:\ruby187

and

    C:\Ruby200-x64

install compass in both places, using:

    gem install compass
Cybul
  • 71
  • 2
2

Try running the install command in the bin folder.

$ cd C:\Your_Ruby_Folder\bin
$ gem install compass
Travis Heeter
  • 13,002
  • 13
  • 87
  • 129
1

I have same problem and i resolve it with.

  1. Uninstall ruby end deleted folder ruby
  2. Download ruby version 1.9.x
  3. After thet install sass
  4. last stem: install compass
Dexter_ns88
  • 500
  • 4
  • 7