Flymake is a wonderful thing, and the Ruby/Flymake integration introduced by rails-mode is very, very handy. If you’re not familiar with it, Flymake is an Emacs minor mode that constantly checks your syntax in the background and marks up any code that has problems. It’s like inline spellcheck for your source code.
There’s a problem with the Ruby integration, though, which is that the temporary files it generates frequently get mistaken for project files by tools like Autotest and Merb. I fixed this in my .emacs a long time ago, and after the second person asked about how I fixed it I thought I’d post my fix publicly.
Note: the following is a horrible kludge and the only nice thing I can say about it is that it works. In a perfect world Flymake would make it possible to customise the directory it uses instead of insisting on creating it’s files in the same directory as the originals. My version is monkeypatching in the first degree and if someone would take the time to clean it up and make an honest patch of it I’d happily use it.