IDE options
Apparently screenshots have more weight in today’s visual oriented world, so here goes my consider Emacs for Ruby on Rails development argument sprinkled with nifty images to show you the tip of the iceberg in terms of what is possible.
Now why you would be interested? Well there are a few IDE options floating around. First of all there is TextMate a nice editor, beautifully showcased on RoR videos, but it only for the Mac. So if you are unlucky to not own one, you might as well look around for others. Another commercial choice running on multiple platforms would be Arachno Ruby, you may or may not like this one.
Obviously I’m pushing free software here, as the commercial ones are have their own marketing budget not needing my pesky article. So your options are Eclipse, JEdit, KDevelop, FreeRIDE and Scite with their latest versions and proper plugins. As with all new software usability varies.
Emacs on the other hand has been around for twenty years or so, with an active user-base and continuous development. Support for Ruby exists for long ago, written and maintained by none other than Matz himself. There are also countless other packages floating around, giving you syntax highlighting for rhtml files, version control support, brace code completion and all kinds of clever things.
Unfortunately you will have to pack these together yourself as there is no readily configured system for download. But that not a reason for be discouraged! Just some screenshots of what is possible.
Here we have a Ruby source code properly highlighted. Underneath there is much much more than colors though. There lies an incredibly powerful indentation engine, that will hang your current line correctly to a column whenever you have pressed TAB once regardless of where the cursor is. Note that simple and useful code navigation on the left provided by ECB package.

Using MMM-mode package I can edit RHTML files. Look how clearly ruby code is marked from wherever ERB tags are encountered.

In ruby development and unit testing go hand in hand, so why not run tests from within the editor? What you also don’t see here in a static image is how easily I can jump from failure to failure correcting them one by one. Nice thing is that with simple Lisp code you can wire emacs to run only the test around current placement of cursor … at a click of a button.

Integrate source control! As anywhere you can use keyboard commands to quick execution without raising your hand from the keyboard. Of course you may issue commands with mouse too.

Use the built in emacs diff tool (ediff) to quickly jump around between changes from two different versions. Selectively ignore changes that you don’t like.

Check spelling using multiple dictionaries for different languages.

And many more … you are free to choose!
Comments
-
Could you please! post your .emacs file? I really love this and i’m too much of an emacs newbie to figure this all out on my own
-
We are really need .emacs file like yours, Because Nobody is not unix and emacs expert, I can’t configure emacs like you, This is needeed so many times, I tried with big google search and results not like yours.(First, I was configure my .emacs file with nxml-mode, and php, javascript, ruby, mmm-mode but that was always buggy, always lisp debugger works:)I don’t configure ecb, speedbar and c-etags perfectly, always problem, always wrong in Emacs 22.50 windows. Can you publish yoru .emacs file. This will be very useful…
-
Here is a screencast (1.8Mb) of Ruby on Rails Emacs mode. It is to show that TextMate-like features (text completion, navigation etc.) are availalble on Emacs on Linux, Windows and Mac OS.
I’ll try to post tips at http://agilemacs.blogspot.com.
Thanks for the inspiration! -
OH this is very good stuff, thanks for the screencast. I have given up using ECB since my original post. While it works well with other languages, the “goto model”, “switch to view”, “goto functional test” features or rails-mode paired with ido-mode solve all my buffer handling needs. Glad to see I’m not alone, you have not used the ECB buffers in your screencast neither. Thanks again, got your feed!
