The InfoWorld Test Center sifts through nine Rails IDEs and editors to help you choose the tools to suit your development needs

The Ruby on Rails site bills its eponymous project as "Web development that doesn't hurt." I'm not really sure what that means, but it certainly sounds good.

Further down on the page, it says, "Rails is a full-stack framework for developing database-backed Web applications according to the Model-View-Control pattern. From the Ajax in the view, to the request and response in the controller, to the domain model wrapping the database, Rails gives you a pure-Ruby development environment. To go live, all you need to add is a database and a Web server." That's almost true.

On the Rails download page, after some basic installation instructions for installing Ruby, RubyGems (the standard Ruby package manager), and Rails, as well as some terse hints about how to get started, there's some advice about Rails editors: "The entire Rails core team is using TextMate on Mac OS X. It's a fantastic editor that ships with Ruby on Rails highlighting and macros. If you're not running Apple, check out RadRails. It's a cross-platform Rails editor built on top of the Eclipse IDE."

The Rails team never tries to disguise its enthusiasm for Mac OS X, but it has given short shrift to developers who prefer other platforms -- so let's amplify the Rails Editors and IDEs story a bit.

Something for everyoneI have personally used three OS platforms for Rails: Linux, OS X, and Windows; a fourth supported OS is Solaris. There are four Ruby VMs that can run Rails: plain old Ruby, JRuby, Rubinius, and IronRuby. I have done all my Rails development on Ruby rather than any of the alternate VMs. Your intended development OS will likely constrain your choice of editor. If you are hell-bent on using JRuby, Rubinius, or IronRuby, that could also limit your choice of editor.

Test-driven development is very common in the Rails world. When you're developing a Rails application, you typically start by doing some code generation, using a number of handy shell scripts. Once you have a skeleton application, you typically build it up incrementally by adding and coding models and actions, adding and coding tests, running and debugging the tests, refactoring, adding Embedded Ruby pages to generate HTML views, testing the HTML display in a browser, and viewing the server log. If you need AJAX, many actions and effects can be generated entirely from Ruby, but more complicated or uncommon effects usually require some coding and debugging in JavaScript.

In the course of all this, you'll find yourself constantly moving among the test, model, controller, helper, and view code, and popping among editor, browser, and shell windows. An IDE and/or some editing shortcuts can cut down on the amount of time you spend popping around.

When it comes to code editors, one size does not fit all. It never has. Even in the early days of the ARPAnet, not everyone who programmed on the PDP-10 used TECO; later on, Unix developers argued fruitlessly about the relative merits of emacs and vi. Emacs and vi (or xemacs and vim, if you prefer) are still options, by the way: Both have plug-ins for Ruby and can be used effectively for Rails development, along with a browser and a command shell. Other editors that can be used for Rails in combination with a browser and a command shell include SciTE, SlickEdit, and jEdit.

Bundles of joy So why do the Rails core developers swear by TextMate on the Mac? Simple: Early on, they built "bundle" (essentially macro) extensions for TextMate as tooling for Ruby and Rails programming.

Bundles give you incredible power, at the expense of needing to memorize keyboard shortcuts for efficiency. The bundle approach to automation makes eminent sense for a developer who lives in one code editor all day. On Windows, the bundle approach can be found in the TextMate-inspired E Text Editor and InText; both include a Ruby and a Rails bundle.

Why does the Rails team suggest RadRails for everyone else? Basically, it's an integrated GUI development environment for Rails, and it runs wherever Eclipse and Java run. Also, Aptana RadRails Community Edition is free.

Several other products follow the RadRails integration approach to Rails development: 3rdRail, Komodo, NetBeans, IntelliJ IDEA, and Ruby in Steel. They all play variations on the theme, but if you know one, you'll that find that the others look familiar.

You don't have to restrict yourself to one tool, either. You can mix and match tools for a complete set of functionality. For example, on the Mac, you might want to mix TextMate, which gives you power editing via its Rails bundle, with either NetBeans or RadRails, both of which are free IDEs that have debuggers.

In this review suite, I've covered the Rails IDEs and the editors with Rails bundles. See the individual product write-ups, pros/cons and features tables, and Bottom Line boxes (at the bottom of each page) for more on each product.

SapphireSteelRuby in Steel Developer Edition 1.2 and Text Edition 1.1.5In my brief review of Ruby in Steel 1.0 from early 2007, I said, "Any serious professional Ruby developer who has a copy of Visual Studio 2005 Professional or above should at least try out Ruby in Steel Developer. If you're like me, the asking price will seem cheap for the combination of the fast debugging and the great IntelliSense support."

The Ruby in Steel product is now up to Version 1.2, which is one of the critical milestones on its road map, as it introduces Visual Rails Workbench (see Figure 1), a Web page designer for Rails that supports Embedded Ruby and templates. That's a significant accomplishment. At this point, the product has most of the Rails integration features that I missed in 1.0, plus some bonus features that I didn't know I'd want, such as a fast JRuby debugger. (See the full feature list for both the Developer and Text Editions.)

The Visual Rails Workbench, the fast debugging, and the great IntelliSense support are the three core features that differentiate Ruby in Steel 1.2 Developer from the Text Edition. The performance hit from debugging with Cylon is barely noticeable, which is not the case with the standard Ruby debugger. There are also mind-blowing dynamic debugging scenarios that work in the Cylon debugger.

Right now, the Visual Rails Workbench can be a little funky when it comes to synchronizing an overall page design with its components, but SapphireSteel assures me that Version 1.3 will fix that issue. Later in the development cycle, the IntelliSense support will be extended to database code and user-selectable libraries, and the Visual Rails Workbench will be extended to handle RXML and RJS. You'll note that there's nothing resembling the Ruby in Steel Visual Rails Workbench in any of the other products I reviewed.

If I had three wishes for new features in Ruby in Steel that aren't currently on its road map, they would be refactoring support, better test integration than the current simple front end for "rake," and support for TextMate-compatible bundles.

A visual overview of Ruby In Steel is available here. You may also watch 10 short screencasts right here.

AptanaRadRails 1.0 When I reviewed RadRails 0.7 in 2006, I said that "all serious Rails developers should consider it for their toolkits." At the time, RadRails lacked debugging and refactoring capabilities. I'm happy to say that its refactoring is now excellent. In addition, its debugging is now sufficient for the purpose, thanks to the ruby-debug-ide gem.

My biggest gripe about RadRails in 2006 was the lack of documentation, which has since been remedied. In addition to a combined help file for RadRails and Aptana Studio, Aptana offers a number of videos, and a book by an independent author has just been published about using RadRails, titled AptanaRadRails: An IDE for Rails Development.

A full table of Aptana RadRails features is available. I would take the comparison columns that list NetBeans and 3rdRail features in this table with a grain of salt; a quick check found several features incorrectly listed as missing in NetBeans and 3rdRail. I don't think the table was current when I viewed it.

The two major RadRails features that are turned on in the Professional edition are profiling and JSON editing. Other features of the Professional edition include FTPS and SFTP access to remote sites, Internet Explorer JavaScript debugging, early access to new builds, and priority support.

I encountered two minor problems with Aptana RadRails 1.0. First, it still doesn't have a visible soft word-wrap display option, which is a general Eclipse issue. Second, it generates .RHTML files for new views on Rails 2 projects that should have .HTML.ERB files.

I was initially concerned when the free open source RadRails project became part of Aptana. In fact, Aptana RadRails is a stronger product than RadRails could have become by itself. The combination of RadRails' Ruby and Rails support and Aptana's JavaScript support into two compatible Eclipse views makes Aptana RadRails a strong choice for people developing AJAX applications on Rails.

On the other hand, if you need any of the Professional features of Aptana RadRails and find the modest license cost a problem, you might want to look at NetBeans as a completely free alternative.

ActiveStateKomodo IDE 4.3 and Edit 4.3I have used Komodo IDE user for Python, Perl, and regular expression development for several years, and occasionally for Ruby, XSLT, and JavaScript development in the last year. When I previewed Komodo IDE 4.0 early last year, I said that "it's worth having if you do more than occasional programming in one or more of the scripting languages that it supports." At the time, Komodo was useful for Ruby scripts, but not for Rails development.

Version 4.0 basically added browser-side features to the IDE. Version 4.1 made Komodo a Ruby on Rails IDE. Version 4.2 smoothed out some features and added auto-update. Version 4.3 added Rails 2 support, unit test integration, improved global search and replace, and abbreviations for inserting snippets. Version 4.4, which was released after most of this review was written, added a section list, multifile SCC commit, column editing, and improved unit testing.

Although Komodo IDE is fairly good as a multiplatform Rails IDE, it's not my favorite of the group. When using Komodo for Rails development, I miss the refactoring support and navigation enhancements found in several of the other products.

A video introduction to Komodo IDE is available for viewing here. You'll find 19 short Web tours of the IDE here.

CodeGear3rdRail 1.1On the surface, 3rdRail seems very similar to Aptana RadRails: They're both easy-to-use Rails IDEs built on Eclipse that also have JavaScript development support. If the comparison ended there, 3rdRail would be in trouble, because the base version of RadRails is free. It doesn't end there, however; 3rdRail is an even more productive environment than RadRails.

For example, RadRails provides simple GUI front ends for Rails generators and rake tasks; 3rdRail goes one better and provides higher-level wizards that collect the necessary information in a GUI and then run a sequence of generators and/or rake tasks in an enhanced command shell.

CodeGear calls this enhanced shell "commanders" and describes it this way: Commanders "merge the power of the command line with the ease of use and productivity of the IDE. This provides the ability to dynamically switch between typing on command lines and the IDE's tools, which are all integrated into the command line. For example, output from commands adding a model or view is immediately reflected throughout the IDE. Command output is hyperlinked, so that clicking on any generated file or folder will open that in the IDE."

That hyperlinking is surprisingly useful for such a simple feature. It can be very confusing to figure out why a test failed or a Rails page threw an error. With 3rdRail, once you pick out the root cause from the command output, one click takes you to the correct line of code. In similar fashion, the 3rdRail dependencies view lets you quickly navigate to the right code from a graphical representation of the application's functionality.

3rdRail offers numerous helpers in the edit window. For example, right-clicking in an edit window brings up a context menu with more than a dozen items, many of which bring up submenus.

Because 3rdRail is more expensive than any other tool reviewed in this suite, and because some of the free tools are more than adequate for Rails development, I would suggest 3rdRail only for developers who spend most of their time building Rails and could justify the increased cost in terms of productivity gains.

To view a video of CodeGear in action, go here. For more on the product's features, go here.

NetBeansIDE 6.1NetBeans has long been a strong Java development environment. It gained Ruby and Rails support in the last year. With Version 6.1, NetBeans is a seriously good Rails IDE.

NetBeans grew up as a Java IDE and is a Sun product, so it's no surprise that it has excellent support for JRuby. It also supports standard Ruby, however, and has a Ruby Platform Manager to let you choose the Ruby interpreter used for a project.

The NetBeans Ruby source code editor demonstrates all sorts of intelligence about code formatting and syntax. In addition, a right-click in the code editor brings up a context menu that lets you navigate from action to view to test to declaration, rename, refactor, reformat, run, test, set a breakpoint, debug, or find usages. Each common action has a keystroke equivalent displayed on the menu; use the menu enough and you'll learn them naturally. This is similar to the way TextMate bundles behave, although not as programmable.

Right-clicking in the project view brings up a context menu that lets you generate a new resource, create a new file, run or debug rake tasks, add plug-ins, or run tests. Any time you cause a command to run, it opens a new tab in the window at the bottom of the workspace for the output. If there is error output, references to lines of code are hyperlinked to make it easy to jump to the correct code, very much like 3rdRail.

The code editor supports a number of shortcuts, snippets, and code templates, including a subset of the TextMate snippets. The number of predefined Ruby and RHTML templates in NetBeans pales beside the number of Java templates, but you can define your own templates.

NetBeans uses the ruby-debug-ide gem for fast debugging. It came configured for the fast debugger in JRuby but not standard Ruby; I had a little trouble convincing it to switch to fast debugging for standard Ruby, but it did eventually catch on after a couple of restarts and an update.

NetBeans may well be the overall pick of this review group, at least based on the numbers. Whether it should be your own pick, however, depends on your personal preferences. For example, Eclipse fans may prefer RadRails or 3rdRail, and fans of "bundles" may prefer TextMate or E.

More information about NetBeans, including five videos, can be found here.

MacroMatesTextMate1.5.7 As I mentioned in the introduction to this review suite, the entire Ruby on Rails core development team uses TextMate on Mac OS X. As I do most of my development on Windows, I had to borrow a Mac (in fact, a MacBook Pro) from InfoWorld to review TextMate firsthand. (Yes, Doug, I'll be shipping it back Real Soon Now.)

TextMate looks entirely different from IDEs such as RadRails or NetBeans. Much of the functionality you expect is there, but it's not obvious until you pull down the Ruby or Rails bundle menu, press a shortcut key combination, or type in the abbreviation for a snippet and press Tab. For examples, see the online extract of the TextMate book or either this or this screencast. Once you discover all that functionality and get a handle on the UI, using TextMate is like having a helpful sprite looking at what you begin to type and then completing your intentions.

It took me a while to warm up to TextMate, but once I did, I understood why its users become so attached to it. I missed the IDE features of RadRails when I was using TextMate, but as I started to learn the Rails bundle shortcuts and my memory of the various Rails command-line utilities returned, I could see how productive TextMate could become for a full-time user. When I switched back to another editor and my fingers tried to use a TextMate shortcut, I was disappointed to have to go back and type out the whole syntax; it was like losing the speed dial buttons on my phone.

If the idea of TextMate's bundles and shortcuts appeals to you but you need to or prefer to develop on Windows, consider either E or Intype, both of which are reviewed briefly later in this suite.

If you do use TextMate most of the time, you may occasionally find yourself in need of a graphical debugger or automatic refactoring. Either RadRails or NetBeans will serve that purpose, for free.

JetBrainsIntelliJ IDEA 7.0.3 with Ruby plug-in 1.0IntelliJ IDEA is widely regarded as an excellent Java IDE and has managed to survive as a commercial product by dint of superior features in the face of strong competition from the free NetBeans and Eclipse products. Although the current Ruby plug-in for IntelliJ IDEA goes a long way toward making it a good Rails IDE, it isn't all there.

Ruby and RHTML code coloring, formatting, refactoring, dependency analysis, and completion work well. Code inspections and debugging aren't yet implemented for Ruby; according to the company, a Ruby and Rails debugger is planned for the IntelliJ IDEA 8 release.

When command shell output is shown in a Run window, it is often -- but not always -- hyperlinked to bring up the appropriate line of code in an edit window. Unfortunately, the one line of traceback that is not hyperlinked is usually the one I need to follow.

At this point, if you develop Rails with IntelliJ IDEA and want to use a graphical debugger on occasion, you'd be well advised to use NetBeans or RadRails as a free secondary IDE. I can't recommend that anyone buy IntelliJ IDEA just for the Rails support, but I can suggest it to developers who develop Rails as well as Java sites.

E Text Editor 1.0.20 Beta The E Text Editor is basically a TextMate clone for Windows. It shares many of TextMate's strengths and weaknesses. Because several TextMate bundles rely on Unix capabilities, E asks that you install Cygwin to enable those bundles. E has a few Windows-specific bundles of its own, for example to support C# and ASP.Net, and ships without the obvious Mac-specific bundles, such as ActionScript and Objective-C.

E takes advantage of the community that has grown up around TextMate. Most of what's in the TextMate book applies equally well to E, and many TextMate bundles downloaded from the Macromates Subversion repository will run as is in E. Some won't, of course; Windows currently doesn't have an AppleTalk clone, at least that I know of.

E has a project view that's surprisingly useful. As you can see here, the E project view on my computer also shows the TortoiseSVN icon for each file. E also has its own local versioning mechanism.

I experienced occasional crashes when using E, but I couldn't reproduce them well enough for a bug report. The author appears to be responsive; I saw two updates to the product during my tests.

If you adopt E as your primary Rails development environment, consider using RadRails or NetBeans as a free secondary IDE for your debugging and refactoring needs.

Intype0.3.1 AlphaIntype is a fast, efficient code editor for Windows that was inspired by TextMate. It's actually good enough to use as a free Alpha test version, but it lacks many of the features implemented in E. For starters, it has no project view; it's missing about half of the Rails bundle; and it has no bundle editor. Unlike E, it has no way to implement bundle features that require Unix functionality.

Given its omissions, I'd only recommend the current version of Intype to developers who want a TextMate-like editor for Windows but can't afford to or don't want to pay the $34.95 price of E.

Intype development appears to have stalled, based on the stale content on the Intype Web site. If the developers ever get their act together to release a product, they intend to charge roughly the same price as E.

More polish required

In conclusion, Rails itself is in a state of flux, and the Rails IDEs are mostly still trying to catch up to the changes introduced on Rails 2.0, much less Rails 2.1. Most of the Rails IDEs discussed in this review package will work well with the current Rails and rake gems with only minor annoyances: The most common annoyance is confusion between RHTML files and HTML.ERB files when generating and navigating to views.

Of course, the next time the Rails core changes, the IDE vendors will have to scramble to keep up, once again.