So here's the various excellent resources I used to finally get ruby + gem + rails working on my ubuntu system:
Install ruby:
http://www.rubywizards.com
Grab the gem source
http://rubyforge.org/frs/
To Install gem:
tar -zxvf rubygems-0.9.2.tgz
cd rubygems-0.9.2
ruby setup.rb
If you get the zlib error, you probably need to get additional libs:
apt-get install zlibc zlib1g zlib1g-dev
(see http://www.nabble.com/Gems
Re-compile and re-install ruby now that the new libs are there
http://www.rubywizards.com
Make sure you're running the latest version:
ruby -v
ruby 1.8.5 (2006-08-25) [i686-linux]
if you still get the zlib error, copy the zlib over (this should be one line):
sudo cp /usr/lib/ruby/1.8/i486-linux
Great info about the zlib error in Ubuntu:
http://www.penlug.org/twiki
Then re-install gem:
ruby setup.rb
make sure gem works:
gem -v
0.9.2
Then grab rails:
gem install rails --include-dependencies --remote
make sure you're good to go:
rails -v
Rails 1.2.2
I hope this helps someone!