Monday, 10 September 2007

NetBeans Intervenes

Note: The RichText blog has moved to

Regular readers of this blog will know that I'm not averse to trying new IDEs for my rails development.

I recently came across this post by George Cook about an app I hadn't considered.... NetBeans.

George does a great job of explaining NetBeans's virtues, so I won't repeat them all here, but to sum up, it does everything I need a rails IDE to do plus a little bit extra. The most impressive feature for me is the in-IDE fast debugging (more on how to set this up below).

NetBeans does have it's down points. With its default settings it doesn't look as slick as TextMate, but after some fiddling around with the preferences you can rectify this. It does use more memory than TextMate but even on my MacBook with 1GB RAM and lots of other applications open, I still have a little bit free. Besides, compared with something like Microsoft Visual Studio 2005 (which eats RAM for breakfast) NetBeans is a veritable size zero.

There is a ruby-only build of NetBeans available which helps to keep the memory footprint down. The exact version I installed was build 3533, which seems to work fine.

UPDATE (26 Sep 07): Netbeans 6 Beta 1 is now out! Get it from the Sun web-site.

Getting started with NetBeans

Here are few quick pointers to get you going.

To begin, all you have to do is do:
-> File -> New Project
.. and then choose "Ruby on Rails Application with Existing Sources"
and browse for your rails folder.

You need the ruby-debug-ide gem installed (sudo gem install ruby-
debug-ide) to do fast debugging.

Before trying to debug, you need to go to:
-> Preferences -> Ruby -> Platform
... then choose the location of your ruby interpreter (e.g. /usr/local/bin/ruby)
You should then be able to select the Fast Debugger radio button for the
Debugger engine. (If you can't, try restarting NetBeans - this worked for me).

Digg Technorati Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Please also visit the Swirrl blog


Sydney said...

I agree, it's nice, but NetBeans does the thing that I absolutely hate about all the Java IDEs - it feels it needs to protect me from my file system - I want to see my tests folder (in which I have a test_helper.rb file), but it has to hide it from me so that it can present things the way it wants to. Really annoying.

Rich said...

What do you mean sydney? Are you referring to the Netbeans 'project' view? I agree that this view is a bit annoying, so I tend to use the 'files' view instead (go to Windows->Files) - this gives you full access to the folder structure of your project.

Sydney said...

Yep - that's exactly what I meant. Good to know there's an alternative. Thanks.