RubyMode provides font-locking, indentation support, and navigation for Ruby code.
It’s included in Emacs 23 and is also available via ELPA. However, those copies have no guarantees of backwards-compatibility, so if you’re having trouble with it on an older Emacs version or XEmacs, you can use the copy that’s included with Ruby, which attempts to be highly compatible. You can get it from Ruby’s trunk like this:
svn co http://svn.ruby-lang.org/repos/ruby/trunk/misc ruby-mode
Web frontend to that repository: http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/misc/
See also RubyOnRails.