Problem with installing Rails 2.3.8 on Ubuntu 10.04

hi,

I installed the ruby-full package. After downloading the rubygems
1.3.7, I installed it without any problem. I guess it should have
installed relative gems by default, such as activesupport.
Any help is appreciated.

Mars

root@mars-laptop:~# uname -a
Linux mars-laptop 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02
UTC 2010 i686 GNU/Linux
root@mars-laptop:~# ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
root@mars-laptop:~# gem -v
1.3.7
root@mars-laptop:~# gem install rails --debug
Exception `NameError' at /usr/local/lib/site_ruby/1.8/rubygems/
command_manager.rb:164 - uninitialized constant
Gem::Commands::InstallCommand
Exception `NoMethodError' at /usr/lib/ruby/1.8/rational.rb:78 -
undefined method `gcd' for Rational(1, 2):Rational
Exception `Gem::LoadError' at /usr/local/lib/site_ruby/1.8/rubygems.rb:
779 - Could not find RubyGem test-unit (>= 0)

Exception `Gem::LoadError' at /usr/local/lib/site_ruby/1.8/rubygems.rb:
779 - Could not find RubyGem sources (> 0.0.1)

Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /root/.gem/specs/rubygems.org%80
Exception `EOFError' at /usr/lib/ruby/1.8/net/protocol.rb:135 - end of
file reached
Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /root/.gem/specs/rubygems.org%80
Exception `IOError' at /usr/local/lib/site_ruby/1.8/rubygems/format.rb:
50 - closed stream
Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /usr/lib/ruby/gems/1.8
Exception `Gem::InstallError' at /usr/local/lib/site_ruby/1.8/rubygems/
installer.rb:233 - rails requires activesupport (= 2.3.8, runtime)
ERROR: Error installing rails:
  rails requires activesupport (= 2.3.8, runtime)
root@mars-laptop:~#

Hi,

now you have rails 2.2.3 installed, the easyest way is to run the
following command :
(with sudo if needed)
"gem update rails" : will only update the rails gem
"gem update --system" : will update all your installed gems to the
last stable version