Found this awesome link for getting ruby syntax highlighting in emacs and seems to work swell in for Ubuntu 7.10.
wget http://svn.ruby-lang.org/repos/ruby/tags/v1_8_5_53/misc/inf-ruby.el wget http://svn.ruby-lang.org/repos/ruby/tags/v1_8_5_53/misc/ruby-mode.el sudo cp inf-ruby.el /usr/local/share/emacs/22.1/site-lisp/. sudo cp ruby-mode.el /usr/local/share/emacs/22.1/site-lisp/.
then… copy and paste this into your ~/.emacs file
;loads ruby mode when a .rb file is opened.
(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby scripts." t)
(setq auto-mode-alist (cons '(".rb$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist (cons '(".rhtml$" . html-mode) auto-mode-alist))
Now you’re on your way to open your .rb files (assuming font-lock-mode is on) with syntax highlighting!
(Alt-x font-lock-mode)