SaltyCrane Blog — Notes on JavaScript and web development

gem error: Could not find rails (> 0) in any repository

Installing rails (per the Rails book, 3rd edition):
$ sudo apt-get update
$ sudo apt-get install build-essential
$ sudo apt-get install rubygems ruby1.8-dev libsqlite3-dev
$ sudo gem install -y rails
I got this error:
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  While executing gem ... (Gem::GemNotFoundException)
    Could not find rails (> 0) in any repository
Per the Army of Evil Robots article, I did the following:
$ gem env
RubyGems Environment:
  - VERSION: 0.9.4 (0.9.4)
  - INSTALLATION DIRECTORY: /var/lib/gems/1.8
  - GEM PATH:
     - /var/lib/gems/1.8
  - REMOTE SOURCES:
     - http://gems.rubyforge.org
$ sudo rm /var/lib/gems/1.8/source_cache
$ rm -rf ~/.gem/
$ sudo gem update
Updating installed gems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Gems: [] updated
$ sudo gem install -y rails
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed rails-2.1.0
Successfully installed rake-0.8.1
Successfully installed activesupport-2.1.0
Successfully installed activerecord-2.1.0
Successfully installed actionpack-2.1.0
Successfully installed actionmailer-2.1.0
Successfully installed activeresource-2.1.0
Installing ri documentation for rake-0.8.1...
Installing ri documentation for activesupport-2.1.0...
Installing ri documentation for activerecord-2.1.0...
Installing ri documentation for actionpack-2.1.0...
Installing ri documentation for actionmailer-2.1.0...
Installing ri documentation for activeresource-2.1.0...
Installing RDoc documentation for rake-0.8.1...
Installing RDoc documentation for activesupport-2.1.0...
Installing RDoc documentation for activerecord-2.1.0...
Installing RDoc documentation for actionpack-2.1.0...
Installing RDoc documentation for actionmailer-2.1.0...
Installing RDoc documentation for activeresource-2.1.0...
It worked! Continue:
sudo gem update sqlite3-ruby
Updating installed gems...
Attempting remote update of sqlite3-ruby
Select which gem to install for your platform (i486-linux)
 1. sqlite3-ruby 1.2.2 (mswin32)
 2. sqlite3-ruby 1.2.2 (ruby)
 3. sqlite3-ruby 1.2.1 (mswin32)
 4. sqlite3-ruby 1.2.1 (ruby)
 5. Skip this gem
 6. Cancel installation
> 2
Building native extensions.  This could take a while...
Successfully installed sqlite3-ruby-1.2.2
Installing ri documentation for sqlite3-ruby-1.2.2...
Installing RDoc documentation for sqlite3-ruby-1.2.2...
Gems: [sqlite3-ruby] updated

Comments


#1 ihab commented on :

ihab@ubuntu:~$ sudo gem install -y rails ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find rails (> 0) in any repository ihab@ubuntu:~$