Ruby Development on Linux Part 3

Erica Kastner · July 11, 2009

I’ve posted earlier about my attempts to find the perfect development environment on Linux, an environment that would match the elegance and ease of TextMate on OS X.  I’ve always been a fan of the freedom that you get with Linux and I’ve been willing to sacrifice prettiness as long as the environment is intuitive and easy to use.

So far, my journey has been wrought with failures, but there have been a few bright spots.

By far, my favorite platform is Ubuntu.  They’ve really nailed the desktop usability aspect as it trumped CentOS and Fedora in being able to recognize my video card and use dual monitors.  However, Ubuntu still suffers from some quirks.  With full visual effects enabled, I can only open so many instances of Firefox without strange things like page content not scrolling.  When I hit a certain number of windows open over several desktops, Gnome freaks out and merges them all into a single workspace, disabling full visual effects.

I have tried many text editors and IDEs but all come up short in some way.

I can’t stand vi’s separate edit and navigation modes.

XEmacs is quick and powerful, but there are too many quirks that keep me from loving it.  The speedbar widget exists as a separate window, which makes task switching more of a pain.  Simply finding settings and saving them across sessions is cryptic and difficult.  Installing a language extension requires some elisp programming.  I just want to click!  Copy and paste are broken.  If I copy in emacs, I can’t paste into another app, and vice-versa.  The only way to do it is to use the edit drop-down menu in each app.  Aside from that, the actual act of text editing in emacs is a breeze.  However, I still miss the Textmate macros that generate things like RSpec describe and it blocks.  One redeeming quality of xemacs is that I can have multiple windows open.

Netbeans works, but is a bit slow.  I also hate having to create an nbproject folder to keep project state.  The same goes with Eclipse, Aptana, JetBrains, and all the rest.  IDEs are too cumbersome, especially when most of them force you into a MDI interface.  I really like having many different windows open when editing a project.  Tabs just don’t do it for me.  In fact, that’s one area where Textmate disappoints me.

I had tried to make gedit act like Textmate, but it would crash a lot.

Lately, I’ve had the best results with Komodo Edit.  I’ve been able to customize the keyboard shortcuts so that alt acts just like the command button in Textmate/OS X.  It’s very helpful when I have to switch off our Mac onto the Linux box.  I’ve also set up a “cobalt” theme.  Working in split-screen mode with the whole project window spanned across monitors works well enough for my desire for multiple windows.  I can have the code on one side with the spec on the other.  Komodo also features the quick file open command and can show you where a method is defined.  The drop-down autocomplete is also nice.  There is no integration with rspec, et al, but I’m fine using the terminal.  In fact one annoyance I have with Textmate is that any output to STDOUT in a spec is assumed to be HTML in Textmate’s output screen.  This means I have to use HTMLEntities.new.encode when inspecting an object.  With the terminal, text is text!  Komodo also requires project files to be maintained in the root directory of your project, but I guess I can live with that.  One final complaint: Komodo tends to crash if I have too many separate windows open.  I guess I just can’t have 6 projects open at a time.

Redcar is a very promising project.  It’s designed to act just like Textmate and will support TM bundles.  It’s also written in Ruby!  The only thing that has kept me from using it is that the gtk-ruby libraries that it uses have C extensions that are written specifically for Ruby 1.8.  I’ve spent a good chunk of time porting them to 1.9 compatibility, but it’s such a large task I don’t have time to port it all.  I do have Ruby 1.8 installed in parallel, but trying to get everything to run proves difficult when different components of Redcar try to run /usr/local/bin/ruby (which points to 1.9 on my system).

Over all, Komodo on Ubuntu has made life manageable, but not quite the experience I get with Textmate.  I’m sure once Redcar is 1.9 compatible I’ll be switching.