My Ruby IDE

I’ve decided to use the Intellij IDEA Ruby plugin as my Ruby IDE when working on larger projects and use Aquamacs Emacs for quick work. I think you should all buy IDEA too, so that they are encouraged to make it as good a Ruby editor as it is a Java editor.

Some people use Emacs for large projects. I’m handicapped in doing that because I have an unusually bad short-term memory. So I will often want two or three windows of code plus one shell/test window open. Or at least, I will want wicked fast ways of switching to recently used files. I’ve never found an Emacs workflow that makes having more than two visible buffers comfortable. And Emacs has a more cumbersome way of flipping to recent files than IDEA, plus it doesn’t have the convenient navigational sidebar of modern tools.

I should note that my Emacs skills froze more than a decade ago, so I may be unaware of today’s goodness. In fact, looking in my .emacs file, I see this:


(setq shell-mode-hook
      '(lambda ()
	 (my-shell-setup)
	 (setq mode-line-format
	       (list "%b--" 'default-directory "---%M---%3p---%[(%m: %s)%]%-"))
	 (local-set-key "^j" 'shell-send-input) ; stupid Bridge box
))

The “stupid Bridge box” is a terminal concentrator from around 1987.

I tried TextMate for a couple of months. I approve of the idea, but in practice I had two problems. There’s something about the logic of the key combinations that doesn’t work for me. The way similar commands are organized into related key groups (variants of key modifiers) will not stick in my head, so I was constantly trying control-shift-meta-cokebottle, getting the wrong result, trying shift-control-cokebottle, etc. (And one of the wrong key combinations I often picked—I forget which—made a not-obvious change to the file that would surprise me next time I ran the tests.) Also, the seams kept showing: globalish commands that don’t work because I’m in the sidebar not a source file, the way my tabs kept filling up with files that I’d never intentionally visited, and the like. And the current lack of window splitting is a deal-killer.

I gave NetBeans a shorter trial, and I can’t remember why I didn’t like it.

IDEA has the advantage that I use it for Java, so many of my reflexes carry over. And I always found it had some of that mystical goodness that originally made me prefer Ruby to Python: when I guessed at how something would work, most often I was right.

Still: besides the fact that an upgrade cost me USD 149 (5 euros), it has some disadvantages.

  • The Ruby plugin is beta. I haven’t found too many bugs, but features are incomplete. It’s missing many of TextMate’s nice little Rails features. (But at least you don’t have to install a hack to rerun the last test from anywhere you are.)

  • Because it’s a Ruby IDE wedged into a Java IDE, it may be confusing for people unfamiliar with Java (and, perhaps, Java in IDEA). For example, the General Preferences has these entries: Project JDK (”Ruby SDK 1.8.6″), Project Language Level (irrelevant for Ruby, but on my machine I could choose 1.3, 1.4, or 5.0), and Project Compiler Output (irrelevant).
    (Project setup doesn’t push Java in your face quite that much.)

  • The worst is that it sometimes decides to spend a lot of memory and CPU doing something. When my pokey little MacBook (1.83Ghz, 2G memory) is trying to drive both its screen and a 24 inch external monitor, Time Machine has decided to kick in, and I’ve got various other things running (like Safari, which also likes to suck down CPU while doing nothing visible), IDEA can get slow. I’ll end up typing faster than it can echo characters.

Despite those things, I find IDEA somehow hits a sweet spot where I’m actually working with the code, not the editor (the old ready-to-hand vs. present-to-hand distinction). With other tools, I felt more friction.

3 Responses to “My Ruby IDE”

  1. Giulio Piancastelli Says:

    I stumbled across some settings for Emacs and Ruby/Rails on Stephen O’Donnell’s weblog, a little guide called The Emacs Newbie Guide for Rails. It involved a seemingly very nice plugin called Emacs Code Browser which I think you could find useful.

    Also, I noticed that Eclipse and RDT are missing from your little IDE/Editor roundup. How’s that?

  2. tomm Says:

    don’t forget vim7. It has a lot of nifty functions that weren’t in prior versions, including a vimmate plugin for those who like textmate. I was thinking of moving on from vi a while back, but vim7 is really nice.

  3. Brian Marick Says:

    I usually end up stumbling along with Eclipse at client sites. If I had sense, I’d learn it instead of IDEA. But, for either Java or Ruby, it shares the sense of awkwardness and seams showing that I got from TextMate. (I’ve only tried RDF for a day or so, also at a client site.)

    Really, none of the alternatives is good enough yet.

    Switching from emacs to vi would be like switching from the Crips to the Bloods, Manchester United to Arsenal, Steelers to Patriots. Not only would it strike at the core of my self-conception, I’d probably get beaten up.

Leave a Reply

You must be logged in to post a comment.