Error in installing gems...NEED HELP

Silver Spoon's Avatar

Silver Spoon

02 Aug, 2010 10:14 PM

When I try to install gems, i get the following errors:
ERROR: does not appear to be a repository
ERROR: Could not find a valid gem 'rails' (>= 0) in any repository

OS - Linux 10 (Lucid)
ruby -v is 1.8.7
gem version is 1.3.7
gem list gives me a blank list showing Local gems at the top with no local gems installed as i am now installing them from scratch now.
The command i write:

sudo gem install rails mysql sqlite3-ruby mongrel

which gives me errors listed above.
My internet is working fine in browsers and I am also able to use synaptic manager with my GNOME proxy settings listed as as server and 8181 as port.
When i do ping at , it probably goes in an infinite loop, so i end up doing Ctrl + Z to stop the process. So, i guess its unable to ping the above site.
How do i get to know that my server is blocking gem or not??
How can i use --http-proxy with gem install command or set HTTP_PROXY variable with a valid URL of the proxy.??
Is there any other way of doing this???
In all the other discussions, there is no real answer as such. I have read all the discussions related to the above problem, please help me.

  1. Support Staff 1 Posted by Eric Hodel on 03 Aug, 2010 09:23 PM

    Eric Hodel's Avatar

    gem help env explains how to use proxies with rubygems. If you're using --http-proxy RubyGems expects a URL like "http://example:80"

  2. 2 Posted by Silver Spoon on 04 Aug, 2010 04:25 AM

    Silver Spoon's Avatar

    Got it.
    Looks like the sudo command doesn't work with the proxy servers itself in Ubuntu 10.04 Lucid.
    So, if someone you out there faces the same problem, just try the sudo command with the -i option.
    That worked for me, and guess should work with all of u guys too.

  3. Silver Spoon closed this discussion on 04 Aug, 2010 04:27 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac