Quick Impression: Rails on Aptana vs. NetBeans

Short Version

Aptana’s RadRails is messed! Go use NetBeans. You’re a Rails-y, so I’m assuming you have a social life. Go get NetBeans.

Long Version

I’m currently running Ubuntu 7.04, and it’s keeping me feisty (yes, pun intended). Debian people (and inherently Ubuntu’s) have, and rightly so, a stance on Ruby Gems. Gems can’t be automatically converted to Debian packages yet, so RubyGems has to manage its own packaging, overriding Debian’s package tools and causing them to complain.

Why is this important? Because when Debian decided to loosen up and package some essentials, like Rails, Rake and RubyGems, they tweaked them into conformance. Rails installs in /usr/share/rails, Rake, like all sane libraries, in /usr/lib/ruby/1.8/rake, and Gems in /var/lib/gems/1.8. This is completely valid from a packager/sysadmin point of view; but that’s not how the Ruby world works, and it stirs trouble.

For example, when generating a new Rails project using Debian’s rails, it populates the vendor directory with symlinks to Rails libraries. On the other hand, the Rails gem leaves it empty and assumes gem "rails" in config/boot.rb would do the trick. Also, Debian packages like Rake and Rails do the right thing and install their scripts in /usr/bin/rails and /usr/bin/rake, as opposed to RubyGems’ default /bin. But because Debian packages patched RubyGems, these scripts install in /var/lib/gems/1.8/bin/rake.

Not to dive into details, these differences made me run into all sorts difficulties. No wonder Ubuntu recommends installing Rails via Gems, and Rails documentation backs this information. A quick aptitude remove rails rake and gem install rails --include-dependencies updated by environment to Rails 1.2.3; such a humors version number.

It was time to get hot and heavy with Aptana, but generating a new Rails project spit an error, something about not finding rails. Knowing that I have the Rails Debian package, and not wanting to disturb the package gods, I tried to point Aptana to my Rails installation. I dug through the maze of preferences, and found “Window->Preferences->Ruby->Installed Interpreters->Add External Directory”, but Aptana decisively and insistingly replaced/usr/share/rails/ with /rails. Reinstalling Rails via Gems made it work.

It was time to get hot and heavy. Aptana generated my Rails project successfully, now all I need is a debugger. Luckily, Aptana supports rdebug, but since my rdebug-ide isn’t in /usr/bin/, Aptana complained hard.

Too frustrated to objectively continue reviewing, I downloaded NetBeans. After all, Tim Bray likes it, it bundles JRuby, which developers were incidentally hired by Sun. I followed the instructions and I had a full-fledged Ruby IDE in no time. NetBeans only asked me two questions: where’s my Ruby, where’s my rdebug-ide. Debugging worked. WEBrick worked. Rails worked. I was happy.

Conclusion

I understand both IDEs are in early beta stages, and I know exactly why Ruby specifically, scripting languages generally, are difficult to debug and build IDEs for. But there should be a at least a minimum amount of testing before a release. Nothing complicated, just the obvious elements (like, say, adding a Ruby library path).

I didn’t have the chance to try ActiveState’s Komodo for writing Ruby. It is another heavy contender on the Ruby scene, but it was mostly known for its Perl, and later Python, capabilities.

I’m going to give Aptana, NetBeans and Komodo some more reviewing time. Meanwhile, I’m sticking to NetBeans.

P.S. Speaking of Rails. Is it me, or is their wiki going down a lot these days?

Comment (1)

  1. sheamus wrote:

    Did you ever get around to testing Komodo? Is it as good as NetBeans for Rails?

    Thursday, May 22, 2008 at 5:20pm #