Ruby Support for Eclipse

29 Sep 2005

The last time I mentioned the RDT (aka RubyEclipse) project about two months ago, I thought that development on this otherwise promising project had stalled. Since then I've started lurking on the RDT development mailing list, and I was happy to notice that the project appeared to be picking up speed again. The developers are realizing that Ruby is commanding significant interest these days, not least because of the Ruby on Rails framework that is gaining a lot of traction. Many new Rails developers are switching over from J2EE, and a large portion of them are presumably already using Eclipse for their Java projects. A good Ruby plugin for Eclipse would be the most natural development tool for these developers, including myself. In the last few weeks, the RDT development team pushed hard to get the 0.6 release out (the 0.5 release being about 10 months old and still pretty immature). I have not had a chance to try the official 0.6 release, but I've been very successful with various nightly builds from the last fwe weeks. If you're looking for a Ruby IDE (and particularly if you're already an Eclipse user), you should definitely download the latest RDT release. The level of Ruby support is not even close to the level of Java support (and Ruby being a dynamic language, the challenges are somewhat tougher), but nevertheless RDT is already highly usable and features syntax highlighting, rudimentary code completion, Test::Unit integration, and more.

Now that basic Ruby support for Eclipse exists, I think it would be really cool to see some Rails specific support. I'm a big fan of the Eclipse Web Tools Project (WTP), which adds support for web application development to Eclipse. In line with the general Eclipse philosophy and architecture, it consists of a general web project framework (WST), which adds support for HTML, XML, CSS, etc., and a Java specific framework (JST) that ties into it. I think it would make sense for a Rails plugin to integrate with WTP the same way JST does. Potential features could include custom navigator views to expose the Rails modes, views, and controllers, as well as support for RHTML (including autocompletion for instance variables and methods defined in the controller / helper classes), an embedded WEBrick server, and wizard interfaces into the various scripts (such as the generator script).

This would certainly not be a small undertaking, but I think it would be very cool. And it should be able to benefit from the opinionated nature of Rails and the relatively fixed structure of Rails projects, which might obviate some of the configuration dialogs that would have to go into similar Java projects.

Update: GJ pointed me to this article on setting up a Rails development environment on Windows using Eclipse. I have not followed all the installation steps yet, but it contains a lot of tips to make Rails development more convenient using Eclipse, such as capturing WEBrick output within the Eclipse console, running Rails scripts (such as the generator scripts) from the IDE, using the Breakpointer script for debugging, etc. The article is geared towards Windows, but it looks like it should be easy to adapt it to a Unix environment.

blog comments powered by Disqus