error while installing rails and sqlite3

627 Views Asked by At

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

Also,

ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

gem -v
1.8.15

UPDATE:

Trying to install rvm by issuing the following command at the terminal

$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

But, It connects and download a package or so,

Downloading RVM from wayneeseguin branch master
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   125  100   125    0     0     10      0  0:00:12  0:00:11  0:00:01   101
100   125    0   125    0     0      0      0 --:--:--  0:03:26 --:--:--     0curl: (7) couldn't connect to host

But then gives the following error :

Could not download 'https://github.com/wayneeseguin/rvm/tarball/master'. curl returned status '7'.

How do I resolve this issue?

2

There are 2 best solutions below

1
On

I'm presuming you're working on a Linux based system.

If that is the case, please remove any installations you may have made and check out this tutorial on setting up the entire RoR stack I had written.

(The problem you seem to be having is most likely related to either bad installation of openssl / curl or the fact that you're hiding behind a http-proxy)

1
On

I have not had this issue, but you could try to state the version

sudo gem install rails -v 3.1.0


sudo gem install sqlite3 -v 1.3.5