Following this tutorial here, to install ruby on rails
on ubuntu 11.10
with sqlite3
when I run the following command
sudo gem install rails
I get the following error :
ERROR: Could not find a valid gem 'rails' (>= 0) in any repository
Also, when I try the command,
sudo gem install sqlite3
I get the same error
ERROR: Could not find a valid gem 'sqlite3' (>= 0) in any repository
How do I resolve this?
Rails is not available for Ruby 1.9.1 - so if you remove Ruby 1.9.1, you can choose: either you use RVM to install Ruby 1.9.2 or you install Ruby 1.8 and you should be able to install Rails (however, using a older version of Ruby == older version of Rails afaik) :)
(I'm using RVM, which I like as it gives me the opportunity to switch between different installations of Ruby and also develop without having to be root - however I would read more about how RVM works before using it on a production server)
I have fixed this issue using the proxy command option of gem install. It has the following format:
Check the following answer for more details.