Emacs and Ruby on Rails

There is an Emacs mode for working with Ruby on Rails (of course). The main project page can be found here. In order to get everything set up, I had to do the following:

  1. First download the latest release of the project and extract it into your emacs library directory. I install most of my extensions into a directory of my $HOME called “~/my/cfg/emacs”. This creates a subdirectory called “emacs-rails”.
  2. I then added the following lines to the end of my .emacs file:

    (setq load-path (cons
                            (expand-file-name “~/my/cfg/emacs/emacs-rails”)
    (require ‘rails)

  3. The package depends on the emacs lisp files in the ruby distribution’s “misc” directory. If you don’t have them, grab a copy of the ruby tarball, extract, and install them in your emacs library directory.

  4. The package also depends on a emacs function called “find-recursive”, which I grabbed from here.

EDIT - OK, more useful to me at this stage is rhtml-mode which gives me syntax hi-lighting for rhtml files and can be downloaded here. Also apparently rinari is the successor to emacs-rails.