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:
- 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”.
- 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") load-path)) (require 'rails)
- 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.
- The package also depends on a emacs function called “find-recursive”, which I grabbed from here.