NetBeans to IntelliJ to Eclipse to NetBeans to Eclipse to IntelliJ - Evaluating IDEs for Ruby on Rails Development

The following is a just a dump of my notes gathered over the last 7
weeks as I hopped from IDE to IDE in search of the perfect IDE for
RoR. Unfortunately, there isn't one... and the perfect one would be
made up of different features from all three. I concede that a number
of the gripes below are are of a general nature and not specific to
RoR... but I thought I'd just dump my notes here as they may be of
interest to somebody about to embark on a similar IDE tour.

Generally speaking, NetBeans has the most complete support for RoR..
with code navigation, auto-complete etc. .. but IntelliJ is the most
superior all-round editor. Eclipse is literally in between.

- NetBeans gripes...
+Howto set keymap for "go to file" to Ctl+Shift+N ? ... can't find "go
to file" in the keymaps
screen... will concentrate instead on howto import my intellij keymap
+does nb have a similar feature as "scroll to source" in intellij? ...
James has pointed out the
"select in" from the editor window popup .. but still looking for an
options to have the navigator
  pane and editor pane always in sync
::>gave up on NetBeans...
trying out IntelliJ's Ruby support after a few key things missing
driving me nuts in NetBeans...
+ autoscroll to source
+ expand selection from cursor ... ctrl+w
+ paste from clipboard history ... ctrl+shift+insert
+ Open File support not as good as intellij (which itself is not
ideal).. the problem is that there
are so many files with the same name in a rails app ... eg,
"show.html.erb" ... which NetBeans will
give you a result list of mammoth proportions ... IntelliJ allows you
to specify (for example)
foo_bars\show .. which narrows down the search result
dramatically ... It would be even better
however if it allowed us to do *bar*show or even *bars\show because in
our app there are just
so many entities that are named foo_..

- moved to IntelliJ plus Ruby plugin

- svn hell ... upgraded tortise to 1.5 and did svn up .. only to find
that svn integration via IDEA
stopped working ... complaining about the client being too old...

- much pain and suffering whilst moving from IDEA to Eclipse ... the
keymappings don't all seem to take ...
(eg, Ctrl+W for select.. ) ... and svn integration is crap compared to
IDEA ... but IDEA is pre 1.5 so
cannot go back now anyway

- eclipse gripes...
+ doesn't have copy-from-clipboard-history or whatever intellij calls
it
+ collapse all does not work in x_spec.rb .. does not collapse
"describe" or "it" blocks
+ does not have unnamed or even just numbered bookmarks .. they all
need to have a name and are project-scope, not page scope
+ invoking synchronize forces change of perspective .. should be able
to sync from within the RadRails/Ruby perspective

- try NetBeans again .. gripes:
+ cannot search keymapping easily to allow modify.. eg, I could right-
click in editor and Select In -> Projects but if I wanted that
keymapped I could not easily find it in the keymapping dialog. I
tried modifying some other keymap to the same keys so's to get a clue
from the key clash error message but all I got was "already assigned
to Select Node in Projects action" .. which gave me no clue as to
the fact it resided under Window -> Window/Select Document In
+ keymapping to run rb file does not work repeatedly, and when via
mouse a new tab is opened for each invocation
+ svn integration not as good as intellij

- Ruby debugger ... check again what is available in IntelliJ .. may
have to go back to NetBeans?
::>The Eclipse debugger does not work for jruby ... ruby only ... and
our app no longer works with ruby only
now that we have dependencies/imports on/of java code
::>NetBeans debugger is is really, really slow .. but at least it
works.
::>Ruby debugging to be supported in IntelliJ in september

As you didn't mention Ruby In Steel, maybe I could mention that we have
the fastest integrated debugger for standard Ruby - and we debug JRuby
too. Our Ruby debugger includes breakpoints, tracepoints, conditional
beakpoints, hover+drilldown debugging (expand arrays, hashes and other
objects), call stack navigation, dynamic debugging (change variable
values and actual types while debugging) and much more...

Here is some more info:
http://www.sapphiresteel.com/Debugging-Ruby-with-the-Cylon
http://www.sapphiresteel.com/Dynamic-Debugging-In-Ruby
http://www.sapphiresteel.com/Ruby-Debugger-Enhancements
http://www.sapphiresteel.com/How-To-Debug-Ruby-Inside-RHTML
http://www.sapphiresteel.com/Ruby-Debugging-with-Cylon-Tutorial

best wishes
Huw Collingbourne
SapphireSteel Software

- NetBeans gripes...
+Howto set keymap for "go to file" to Ctl+Shift+N ? ... can't find "go
to file" in the keymaps
screen...

Open the keymap, and "Go To File..." is listed under the "Tools"
category.
Yeah, that's a strange place. We're well aware that the keymaps editor
needs improvements (and in particular, search).

+does nb have a similar feature as "scroll to source" in intellij? ...

I'm not sure what feature this is.

James has pointed out the
"select in" from the editor window popup .. but still looking for an
options to have the navigator
pane and editor pane always in sync

Just FYI, Ctrl-Shift-1 does it so you don't have to do this via the
mouse
every time,

+ expand selection from cursor ... ctrl+w

This is Ctrl-Shift-. (dot) in NetBeans. With comma it goes the
opposite direction.

+ Open File support not as good as intellij (which itself is not
ideal).. the problem is that there
are so many files with the same name in a rails app ... eg,
"show.html.erb" ... which NetBeans will
give you a result list of mammoth proportions ... IntelliJ allows you
to specify (for example)
foo_bars\show .. which narrows down the search result
dramatically ... It would be even better
however if it allowed us to do *bar*show or even *bars\show because in
our app there are just
so many entities that are named foo_..

Ok. You might want to use Go To Type instead of Go To File, which
despite the name lets you jump
to arbitrary classes, modules or methods. (To jump to an arbitrary
method, prefix it with #, e.g. #to_s lets you
jump to all the to_s methods). In the Go To Type dialog you can do
all kinds of filtering -- wildcards/regexps,
camelcase matching, etc.

+ cannot search keymapping easily to allow modify.. eg, I could right-

Yep, we know - and it's definitely slated for a rewrite.

click in editor and Select In -> Projects but if I wanted that
keymapped I could not easily find it in the keymapping dialog.

That one already has a default keybinding - Ctrl-Shift-1 (which should
also be shown in the context menu on the right hand side).

::>NetBeans debugger is is really, really slow .. but at least it
works.

Really? Can you provide more details on this? The debugger should
support the fast debugger interface for C Ruby (it will attempt to
install the relevant gem) which should make debugger really fast. And
in recent (6.5) builds of NetBeans we also have fast debugger support
for JRuby now that JRuby has hooks for it.

-- Tor

Thanks Huw, I didn't know VisualStudio supported Ruby ... but I'm not
likely to get VisualStudio.
In fact I'm a wisker away from ditching Vista entirely in favour of
Ubuntu... the "Host Process" error dialog is doing my head in.

Just FYI, Ctrl-Shift-1 does it so you don't have to do this via the
mouse
every time,

Yes.. that is my dream .. to throw the mouse away ... don't want to
waste any time moving my fingers from the keyboard!
Seriously though... in Eclipse and IntelliJ there is the ability to
"Link with Editor" (Eclipse) or "Autoscroll to/from
Source" (IntelliJ) ... which is a "sticky" version of the Ctrl-Shift-1
functionality of NetBeans.

> + expand selection from cursor ... ctrl+w

This is Ctrl-Shift-. (dot) in NetBeans. With comma it goes the
opposite direction.

Yes... I had found this functionality in NetBeans, but it's not as
fine-grained as IntelliJ's which expands based on whitespace,
camelCase, dots, brackets etc.
... but hey... you're one up on Eclipse which still only supports ctrl
+arrow+shift selection.

Ok. You might want to use Go To Type instead of Go To File, which
despite the name lets you jump
to arbitrary classes, modules or methods. (To jump to an arbitrary
method, prefix it with #, e.g. #to_s lets you
jump to all the to_s methods). In the Go To Type dialog you can do
all kinds of filtering -- wildcards/regexps,
camelcase matching, etc.

I did use that for classes... but it did not help for *.html.erb files

> ::>NetBeans debugger is is really, really slow .. but at least it
> works.

Really? Can you provide more details on this? The debugger should
support the fast debugger interface for C Ruby (it will attempt to
install the relevant gem) which should make debugger really fast. And
in recent (6.5) builds of NetBeans we also have fast debugger support
for JRuby now that JRuby has hooks for it.

I was debugging a spec test... if that makes any difference to
debugging versus any other ruby code?

Tor, probably the biggest problem I have with JRoR dev on Netbeans is
the file open, given that I'm often opening files such as html.erb,
spec, rake, yml.
Even if it only supported wildcard replacement *foo* etc it would be a
vast improvement. Otherwise I think the IDE is great, I especially
like the code completion and associated "doc helper", thanks.

Sam wrote:

Thanks Huw, I didn't know VisualStudio supported Ruby ... but I'm not
likely to get VisualStudio.

Just to clarify - we can provide a free copy of Visual Studio with Ruby
In Steel for anyone who doesn't have a regular copy.

In fact I'm a wisker away from ditching Vista entirely in favour of
Ubuntu... the "Host Process" error dialog is doing my head in.

What is the 'Host Process' error dialog? I have never come across that.

best wishes
Huw

SapphireSteel Software
Ruby and Rails In Visual Studio
http://www.sapphiresteel.com

Just as an update .. I moved from Vista to Ubuntu and stuck with
IntelliJ + Ruby plugin until I hit a showstopper bug..
http://www.intellij.net/forums/thread.jspa?threadID=277084&tstart=0
So I was forced to move quickly back to either NetBeans or Eclipse ...
and since NetBeans required less setup than Eclipse I've run with that.
I've been happy with the Ruby support on NetBeans although some of the
refactoring is not as good as IntelliJ's Ruby.
I have also found the svn support in NetBeans not as good as IntelliJ so
I'm using IntelliJ for svn (the bug only affects ruby) and NetBeans for
Ruby.

Aside from the things specified above, I would really like to see in
NetBeans...
+ The ability to exclude directories so that, for example, tmp/war does
not show up in my searches
+ The ability to rerun a spec test that I've just invoked via Run > Run
File.. even after I have navigated away from that file. ie, have
NetBeans rerun the last thing I ran without having to use the mouse on
the Rerun button on the Ouput tab.