Ric’s Ruby on Rails NetBeans Tips
This article is about programming, and is written by Ric Roberts of Swirrl.
I’ve been using NetBeans for rails development for ages, originally inspired by this blog post: NetBeans THE best ruby on rails IDE. Netbeans is now on version 6.5, and there is a ruby-specific build available for rails developers.
Interface Tweaks
I’m quite a visually motivated person and I need to feel aesthetically pleased by my work environment. So, at first, I was put off by NetBeans’ clunkiness. It will never be as visually slick as TextMate or as minimalist as vim, but you can make it look quite nice by changing the display preferences. For example, under normal circumstances, I just turn off or minimise all the extra windows except for ‘files’, and I use the Ruby Dark Pastels theme (from the ‘Extra Ruby Color Themes’ plugin).
That floating window on the right hand side is the quite useful ‘Navigator’ Window, that lets you quickly find functions, variables in the currently open file. I’ve got it docked on the right hand side, but set to hide when I’m not using it so that it doesn’t get in the way and clutter things.
Debugging
For me, the biggest benefit that NetBeans provides over simple editors is fast step-through debugging. This is a bit of a fiddle to get working, but it’s worth it for tracking down those elusive bugs that you just can’t spot. When you first install NetBeans, it tries to use JRuby, and manage your gems for you but personally I prefer to take care of my gems myself from the command-line. You can also just tell NetBeans to use any ruby platform you have installed on your system, so you can ‘train like you fight’ and use the same platform you intend to use in production - in my case ruby 1.8.6. Tip: in order to get NetBeans to enable fast debugging, it seems you need a precise combination of the ruby-debug gems installed (ruby-debug 0.10.2, ruby-debug-base 0.10.2 and ruby-debug-ide 0.3.0 worked for me!)
NetBeans comes with subversion support out of the box, which works great, but if git is more your thing there’s now a module available from nbgit.org. There’s also code-completion which works pretty well, but to be honest, I leave it turned off as I find it gets in the way and distracts me from my flow.

