Gem::RemoteFetcher::FetchError error when do gem install rails

I am trying to install rails on Ubuntu 8.10, and met following errors.
Please help me get through. The same error happens when do gem install
Thanks for your help.

[email protected]:~# gem install rails
ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)
bad response 500 (

#other information
[email protected]:~# ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
[email protected]:~# gem -v
[email protected]:~# gem list

*** LOCAL GEMS ***

activerecord (2.3.4)
activesupport (2.3.4, 1.4.4)
daemons (1.0.10)
gem_plugin (0.2.3)
rack (1.0.1)
rake (0.8.7, 0.8.3)
wirble (0.1.3)