IntelliJ does it again - this time for Ruby

I'd been doing my Ruby work in Jetbrains' IntelliJ 6 using the open source IntelliJ Ruby Plugin. Frankly, it wasn't a patch on developing Java or C# on any half-way decent IDE, including Visual Studio, which just barely manages the half-way decent mark. The plugin could do syntax highlighting correctly most of the time - you occasionally had to add round braces to clarify stuff or it would get confused - and it could run tests. But it couldn't run just one single test in a suite. If you hit the shortcut for run in a test file, it would run all tests. How annoying is that? It also had a few helper menus to do stuff like script/generate and things of that sort. That pretty much summed up its features.

Well, today I upgraded to IntelliJ IDEA 7.01. All was well, I continued where I'd left off a few minutes earlier when I was working in IDEA 6. I write some code. I go to a test. I hit 'Run' and look at the output panel expecting to see the results for the ten tests in the test case. I see just one result. Did I run the wrong test case? A quick check and then I realise what's happened - only the test in which the cursor was positioned has run. It dawned on me that maybe Idea 7 had more to offer than I'd expected.

A second later I was trying out my favourite IDEA shortcuts to see how they worked for Ruby. Shift+F6 (Rename object under cursor), Ctrl+Space (intelligent autocomplete) and Ctrl+Alt+V (Introduce variable) seemed to work fine (I didn't test 'rename' very extensively though).

Intelligent Autocomplete



Extract Variable



Alt+F7 (Find usages) worked, sort of, because it went and found an entirely wrong usage and didn't find another I knew existed. Ctrl+Alt+M (Extract Method) unfortunately doesn't work. Yeah, I know, RDT crossed refactoring's rubicon for Ruby early in 2007, but it looks like it'll be a while before it shows up in production IDEs.

Now I can look forward to some of the stuff I've been missing when developing in Ruby. Like expressive (and consequentially longer) method names and renaming classes and methods when I understand their usage better. I've been using IDEA since it was in version 4, and every single release has made me go 'Whoa, that is so neat' when I looked at some new feature. And they've done it again with IDEA 7.

Incidentally, I have looked at the competition. I've tried Aptana (I've been using RadRails for a year) and have looked at Netbeans. They're OK, but in terms of the overall package, I find IntelliJ the better option. Of course, the $500 price tag attached to IDEA is way too expensive for someone earning in Rupees, so yeah, for my personal stuff I still use Eclipse+Aptana, but I don't enjoy it very much. As for TextMate, I'll consider it when I get a MacBook, provided Apple does something to shed the 'unfriendly toward developers' image it's sprouted since the release of OS X Leopard.

8 comments:

Masklinn said...

Have you tried the most recent Netbeans? I've read (from Tim Bray for example) that it had a quite good Ruby support. It may be worth checking out.B0

Anonymous said...

looks quite nice so far (PS more screenshots! Even if they are simple, we love screenshots... :D)

Nirav Thaker said...

http://www.eclipsedltk.org/

Sidu said...

Nirav, that's very very interesting. I hadn't come across the DLTK before. In fact, in the UI sceenshots it looks remarkably like the RDT (I'd used RDT and RadRails as plugins in Eclipse to develop Rails).
I'll check it out, thanks for the tip.

Anonymous said...

Komodo Edit is pretty good as well and it's free. :)
http://www.activestate.com/Products/komodo_edit/

Justin Forder said...

A personal license for IDEA is $249.

http://www.jetbrains.com/idea/buy/buy.html#personal

The personal license doesn't restrict your use of IDEA, it just ties it to a specific person.

Leo said...

Uhhh,

Have you really given the latest netbeans incarnation(version 6) a try ? Most of the stuff and much much more is in there and really works well, also for jruby stuff.

Greetz
Leo

Tech Per said...

I love IDEA too, ... for Java development. But for Ruby/Rails, I have found it dead slow! Really. I hate that it is so, because I really love IDEA for everything else. And I do like, that I can, partly, use some of my favourite refactorings and other functionality in Ruby mode in IDEA.

BUT: At times where the Ruby plugin had memleaks in IDEA, I tried Netbeans. And it is MUCH faster. I have learned myself some of the keyboard shortcuts in NB, and now I am actually quite productive with Rails code there.

Even if you love IDEA and Ruby therein, I think you should try NB again. Take a look here, where i blogged about Netbeans Ruby mode compared to IDEA.

The netbeans tool has some better integration with Rails, like completion in model classes from what it can read in migrations, etc.

And did I mention, it is much faster? :-)