Back To The Ruby Mines

This actually wasn't the post I was planning to write this week, but a couple of days ago I got it in my head to try the latest version of RubyMine, the Ruby and Rails IDE from JetBrains.

Now, I tried this with the beta version back in December, and thought it had a long way to go. However, there's been a lot of online chatter about it over the last few months. (Gregg Pollack was particularly enthusiastic in his RailsConf talk), and I thought I'd go back and try again. And I started Twittering about it again, and got some responses, so I thought I'd do a longer write up.

The executive summary is that I started using this on Wednesday and haven't stopped yet. It's come a very long way, and although there are still annoyances, it felt better to me than the other Ruby IDE's. I think it's not quite as solid as my normal TextMate/termial prompt combination, but it's improving rapidly. Overall, this is the first time that JetBrains' Ruby IDE gave me that pleasant "this is like IntelliJ" feeling.

One thing I definitely learned from my years as a happy IntelliJ user back when I wrote more Java code, is that JetBrains releases often, their betas are usually very solid, and they add new stuff really, really rapidly. So my expectations are high that RubyMine will continue to improve.Here are some more specific comments. A lot of these are going to sound negative -- there a many cases where RubyMine has about 85% of the functionality I want, just enough to make me really miss the 15% that's not there:

Navigating

File navigation is very nice, one area where RubyMine just blows TextMate away. The fuzzy file search for file names is much crisper, you can click on a symbol to go to its definition, open file tab management is actually sensible. It works very nicely for getting around your project. Also, the search for symbol feature is outstanding.

I've also always loved the navigation bar that shows you the path to the current file.

Features

One of my favorite features is local history, so you can go back and check the file against all saved versions locally over the past few days, even if they were not separate checkins to source control. This is amazingly useful, and very easy to use.

The auto-completion is nice, but a little fragmented -- there are four different auto-completion commands, which is probably three too many. A unified approach would probably be better here. (I still miss the TextMate/RubyAMP complete against all open files command).

There's an integrated irb console which is nice -- I'd love to also see a regular command line.

I can't really say much about the git/subversion integration -- I have a long-standing, probably irrational aversion to the JetBrains UI for source control integration, so I stuck with my command line for git.

My all-time favorite JetBrains feature is the help menu item that shows you a whole bunch of JetBrains features and flags ones you haven't used. I browse that from time to time to try and pick up useful tricks.

Test Support

As of RubyMine 1.1, it syntax colors and runs Cucumber files in the IDE, this is very nice.

Although there are commands to bounce between associated model, controller, view, and helper files, there's no way to bounce to the test file for an app file. That's a really annoying oversight.

You can run any file open file from its tab, including tests, which is great. It'd be really great if you could run a test file directly from its associated app file.

All though RSpec files are correctly parsed, and the file structure window lets you browse them, Shoulda files are not, and neither are the Rails tests that use test "do something" do end.

UI

A lot of the UI feels a little clunky, over designed, and kind of, dare I say, Java-y. Examples:

  • All the side decoration windows -- project window, test runner, etc, take up a lot of space. It's a problem on a laptop screen because eventually you don't have much room for code. All these windows can be detached, but in the detached state, as far as I can tell, they only float over the main window, they won't act like normal windows. This is a real pain.
  • The debugger is nifty, but a little hard to use, I had a little problem creating watches, and inspecting really introspective objects like ActiveRecord models is awkward at best.
  • It's the only application I use that has enough menu items that it blocks my system-side menu items on the right. That's annoying.
  • Similarly, I think the test result display window could use some polish.
  • The preference dialog is really, really complicated.

Intelligence

The live templates and surround with templates are pretty good -- a hair behind what TextMate offers, but still pretty useful.

As nice as the autocompletion is, the warning and code intelligence systems still have a ways to go. Here's a partial list of things that triggered spurious code warnings from the IDE:

  • Any call to a FixtureReplacement create method. I haven't tested on
  • All RESTful routes
  • Any call to one of the fixture methods
  • Dynamic find methods
  • Anything of the form model.association.select
  • Any call to Timecop.freeze comes up as an error, not a warning.

That's a lot of stuff, and it's a lot of stuff I use regularly -- the problem being that having a lot of spurious warnings makes it difficult to recognize a real one. I realize it's a challenge to verify methods that are created dynamically. I'd at least like an option to say "hey, this method is really there", or better, have the IDE say "you just passed a test that covered this warning -- I guess that method is there, I'll shut down the warning.

That said, it does a decent job flagging syntax errors.

Conclusion

I've got a tough decision coming up when my demo runs out. Right now, I still think my TextMate workflow is a little more efficient. But give me a few months of RubyMine getting better, and me getting back acquainted with the key shortcuts and what's there -- I dunno. It'd be really close.

Meantime, there's no reason for you not to try the 30-day free trial and use it for a day or two.

Related posts:

  1. Trying Out RubyMine
  2. My IDE
  3. Ruby Internals: Overriding Object.require() to watch files as they are loaded
  4. getting user.home in ruby
  5. Ruby Code Audit Checklist

Topics:

Comments: 6 so far

  1. [...] Agile Ajax » Back To The Ruby Mines » Pathfinder Development [...]

    Pingback by Ennuyer.net » Blog Archive » 2009-06-06- Today’s Ruby/Rails Reading, Saturday, June 6, 2009 @ 9:14 am

  2. Hi Noel,

    Let me know if you determine the cause of the error being identified when you call Timecop.freeze. If there’s a change/tweak I can make to the library, I’d be happy to accept a patch (or help you figure out a patch).

    -John

    Comment by John Trupiano, Sunday, June 7, 2009 @ 9:45 am

  3. I couldn’t see $99-worth of benefit over NetBeans. I couldn’t see any real benefit at all, if I’m honest. My ruby-debug-ide and ruby-debug-base gems were out of date and the debugger didn’t work, but the fix was only found though support, which was poor (although the support was good).

    I mostly don’t find I need – or want – the overhead of a full-blown IDE except on the (rare) occasions I need to debug, usually because I want to dip into the framework, most likely due to some comprehension failure on my part. Otherwise lots of little tests and a capable text editor seem to work Just Fine.

    Comment by Mike Woodhouse, Monday, June 8, 2009 @ 5:22 am

  4. @John

    The error on Timecop.freeze is almost certainly because RubyMine is interpreting it as the object#freeze, which takes no arguments. Timecop.freeze takes one argument, so RubyMine interprets that as an error.

    Comment by Noel Rappin, Monday, June 8, 2009 @ 3:51 pm

  5. What are the benefits compared to NetBeans? and NB is free

    Comment by oLdsk3wL, Tuesday, June 9, 2009 @ 10:59 am

  6. It’s been a while since I’ve used NetBeans, but I’ll probably give their new beta a swing. At least in the past, the JetBrains products have always felt a little smoother to me, easier to navigate, easier to edit, somewhat more powerful.

    Comment by Noel Rappin, Wednesday, June 17, 2009 @ 8:14 am

Leave a comment

Powered by WP Hashcash

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com