Cannot get webrick to start on Mac OS 10.5.6

Hi. I'm am new to Ruby on Rails and I'm trying to get my environment
up and running. I know that Ruby and Rails are pre installed on Mac
OS 10.5 but I was having some problems. I went and updated everything
with gem update --system, gem update, etc. However:

[Macintosh:rails/work/demo] jslicari% ruby script/server
Rails requires RubyGems >= . Please install RubyGems and try again:
http://rubygems.rubyforge.org

Doesn't even tell me what version it needs. But:

[Macintosh:rails/work/demo] jslicari% gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.1
  - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-
darwin9.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-9
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/jslicari/.gem/ruby/1.8
     - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

So RubyGems seems to be here with the latest and greatest version.
Something seems to be very out of sync here but I can't figure out
what.

I also tried downloaded rubygems 1.3.1 and installing it again but
that crashes:

[Macintosh:~/desktop/rubygems-1.3.1] jslicari% ruby setup.rb
./lib/rubygems.rb:723:in `set_paths': uninitialized constant Gem::Etc
(NameError)
  from ./lib/rubygems.rb:719:in `each'
  from ./lib/rubygems.rb:719:in `set_paths'
  from ./lib/rubygems.rb:526:in `path'
  from ./lib/rubygems/source_index.rb:66:in
`installed_spec_directories'
  from ./lib/rubygems/source_index.rb:56:in `from_installed_gems'
  from ./lib/rubygems.rb:736:in `source_index'
  from ./lib/rubygems/gem_path_searcher.rb:86:in `init_gemspecs'
  from ./lib/rubygems/gem_path_searcher.rb:21:in `initialize'
  from ./lib/rubygems.rb:684:in `new'
  from ./lib/rubygems.rb:684:in `searcher'
  from ./lib/rubygems.rb:683:in `synchronize'
  from ./lib/rubygems.rb:683:in `searcher'
  from ./lib/rubygems/custom_require.rb:34:in `require'
  from /sw/lib/ruby/1.8/tmpdir.rb:12
  from ./lib/rubygems/custom_require.rb:31:in `gem_original_require'
  from ./lib/rubygems/custom_require.rb:31:in `require'
  from setup.rb:95

I'm out of ideas.

Thanks

Have you tried:

sudo gems update --system

Also, to install RubyGems from the source you need to add sudo:

sudo ruby setup.rb

Yes. I used sudo doing the update.

I also tried doing sudo gem cleanup and had all sorts of errors. I
found somewhere that showed how to do explicit removals using

gem list -d

to find out what is installed where and

gem uninstall --install-dir <dir> <gem>

to uninstall. So now I think I have removed all of the old versions

But that still hasn't solved the problem of being unable to start the
webrick server. I still get the error:

[Macintosh:rails/work/demo] jslicari% sudo ruby script/server
Password:
Rails requires RubyGems >= . Please install RubyGems and try again:
http://rubygems.rubyforge.org

Here’s how to update gems and rails from a stock 10.5.6 client install
George
miniTorrent:~ geo$ gem -v
1.0.1
miniTorrent:~ geo$ rails -v
Rails 1.2.6
miniTorrent:~ geo$ sudo gem update --system
Password:
Updating RubyGems…
Bulk updating Gem source index for: http://gems.rubyforge.org
Attempting remote update of rubygems-update
Successfully installed rubygems-update-1.3.1
1 gem installed
Updating version of RubyGems to 1.3.1
Installing RubyGems 1.3.1
[…]
Removing old RubyGems RDoc and ri
Installing rubygems-1.3.1 ri into /Library/Ruby/Gems/1.8/doc/rubygems-1.3.1/ri
Installing rubygems-1.3.1 rdoc into /Library/Ruby/Gems/1.8/doc/rubygems-1.3.1/rdoc

Thanks, but this doesn't work. Something must be really messed up
here

[Macintosh:~] jslicari% gem -v
1.3.1
[Macintosh:~] jslicari% rails -v
Rails 2.2.2
[Macintosh:~] jslicari% sudo gem update --system
Password:
Updating RubyGems
Nothing to update
[Macintosh:~] jslicari% sudo gem update rails
Updating installed gems
Nothing to update
[Macintosh:~] jslicari% cd Projects
[Macintosh:~/Projects] jslicari% cd rails
[Macintosh:~/Projects/rails] jslicari% rails testme

[...]

[Macintosh:~/Projects/rails] jslicari% cd testme
[Macintosh:~/Projects/rails/testme] jslicari% script/server
Rails requires RubyGems >= . Please install RubyGems and try again:
http://rubygems.rubyforge.org
[Macintosh:~/Projects/rails/testme] jslicari%

I'm thinking I should just uninstall everything and start over from
scratch as something is is obviously out of whack here. I'm not sure
how to uninstall completely though and really make sure everything is
gone.

So how would I remove it by hand and verify it is all gone?