Rubymine – A Love Story

I started writing code in Flash 5. I actually learned OOP in ActionScript, but that’s another post all together. My point is, my first code editor was Flash. Then I moved to Dreamweaver + Homesite. Then I used BBEdit for a while. Then I found Rails and Textmate and I was in love. I’ve never done Java or ASP so I had no need for an IDE, or so I thought.

Anyway, about 6-8 months ago, I looked into Rubymine. I knew Pivotal Labs used Jetbrain’s IdeaJ IDE with a ruby plugin for a long time, so I thought a Rails specific version might be pretty interesting. I’ve used it full time, every day, since I tried it out and I really love it. I find it super productive and it has all the tools that I use my development flow all in one app.

First of all, I’ll state for the record that Rubymine is not a text editor. I still use Textmate every day. You won’t open up random files in Rubymine to edit them. Second, I don’t edit CSS in Rubymine. I use CSSEdit from MacRabbit. So I have no idea how it does with CSS. I also don’t really use Rubymine on my laptop. Most of the win I get from Rubymine is that it’s SUPER efficient

Here’s what my Rubymine setup looks like:

Rubymine setup

Things to note:

  1. Close the file browser and use split windows. Get rid of the toolbar, you don’t need that.
  2. Open up the Run tab on the bottom and move that out to a different window. Then fire up a Rails console and it will be out in that window also. Move this window over to your other monitor (stop reading if you don’t have one, you’re dead to me) and make the editor full screen.
  3. If you open up the preferences go to Editor => Editor Tabs and check “Show Tabs in a single row”
  4. I’ll leave this up to the reader, but figuring out how to get Spork up and running is all kinds of win.
  5. I use a modified version of the Mavenlink theme. I’m using Menlo in 14pt and 1.4 line spacing for my font.
  6. I have loads of my own tab expansions, which are called Live Templates in Rubymine. (‘%=’ + tab outputs <%=  %>). The default ones are lacking, I should package some of mine up, but since I created tons of my own in Textmate, most won’t make sense to you. Suffice to say, I don’t like haml, I like erb + live templates. That’s how many I have. 🙂

My favorite Rubymine features:

  1. Command + B with your cursor on any Ruby/Rails method will take you to where that method is defined. This is way better than any documentation because I CAN READ RUBY CODE. I have been known to write out code just to command+b it and remember if it’s the method I want.
  2. Control + H on any Ruby/Rails method shows you inline documentation. Win.
  3. Control + Spacebar in .feature files will let you ‘live complete’ Cucumber scenarios you’ve already written, including the substitution regex in them. If you don’t understand how much win this is, I can’t help you. 🙂
  4. Refactor => Rename is fucking awesome. Rubymine 2.0.2 will even rename “some_message” in SomeModel.should_receive(:some_message). Rubymine is pretty smart about this stuff, and when it isn’t they’ll fix it (I requested the should_receive stuff and they made it happen).
  5. Item #4 reminds me of my favorite feature over all. Jetbrains is actively developing Rubymine, so if you have a feature request, or you find a bug, or something annoys you, THEY WILL FIX IT. I don’t know about you, but I am morally against Textmate at this point because I don’t think the creator is working on it anymore. He won’t open source it though, because it still makes him money (and I’ve heard the internals are a nightmare). Rubymine’s developers use Cucumber to test it, and I think I even heard they use Rubymine to build Rubymine. They are committed to the product, to making it better, and to listening to the Rails community. I’m willing to bet, if the community were to put it’s weight behind it, we’d see even greater support.

My gripes:

  1. Rubymine is buggy. It just is. But I’m over it. They’ll fix them. If you find a bug in Textmate (like I don’t know, search), you’re never going to see a fix. Never.
  2. Rubymine will sometimes need to re-index your project. This usually isn’t convenient, but if you want all those cool features I just spoke about, and search that’s fast, and lots of the other things that make Rubymine awesome, then suck it up and take it. You need a break anyway.
  3. Rubymine can’t keep up with Yehuda. That’s just the facts. Rubymine has to know alot about Rails, Gems, Bundler, Cucumber, etc and changes in all those underlying libraries will sometimes make it painful to upgrade them and have Rubymine’s awesome features. That’s just life in the fast paced world. Having said that, Rubymine does a GREAT job trying to keep up. For example, it already supports bundler 0.7. Rubymine 2.0.2 will support bundler 0.8 and most of Rails 3.0. It’s got support for haml and sass and spork and lots of cutting edge stuff. And again, they are actively keeping it up to date (can I mention that enough?!?).
  4. Rubymine is a resource hog, but then again, it’s not like I have a lot of other stuff going on my laptop, so it’s not usually a big deal. Also, I’m sure others see this more as I have a SSD drive and it makes this not a big deal.

Chris Bailey prompted me to write this post, and he’s got some stuff on his post about Rubymine I’d like to clear up:

Doesn’t work (well) with MacOS X Spaces – prevents switching to another space when you select another app

I have no idea if this is true or not. I don’t use Spaces, sorry. However, I will say, I don’t switch away from the app much through out the day. Also, submit a bug! They’ll fix it if they can.

File tabs:

  • They go to multiple rows too easily.
  • They just don’t look right/good.  I’m not sure if it’s because they’re non-native tabs or what.
  • I understand, but don’t like how the rows swap when you change to a different tabs.  You lose track of where a file is in the tabs.

I address this above, but I’ll re-iterate. Making tabs into a single line in the preferences will make Rubymine majorly better.

Find in project is nowhere near as fast, or presented as usefully as Ack in Project for TextMate.  It does provide more options, such as filtering files by directory or type and so on, but the speed is generally far more important.

This is puzzling because I have found find to be very fast. And yes, it has MASSIVELY more and better options than Textmate. I haven’t used Ack in project much, so I can’t comment.

Also seems to crash enough that it bothers me.  I can tolerate an occasional crash, although with TextMate I’ve run it for weeks on end with no crash, using it constantly.  I’ve had several either hangs or crashes with RubyMine in the short couple weeks I’ve been trying it out.

I know Pat Maddox has seen his share of crashes. I never see crashes. I don’t know why, but Rubymine is actually more stable for me than Textmate. Even on big projects.

The refactoring bits were just ok.  This is a really hard feature in general though.  Simple refactorings I used, like renaming a method worked fine.  But, changing the name of a model class did about 1/4 of the work needed and was questionable as to whether it was an advantage over just doing it all myself.  It got all the obvious, low-hanging fruit, but it seemed to completely ignore Rails helpers and views.  It misses a bunch of things that I’m not surprised at of course, such as table names in SQL conditions (e.g. in named_scopes), model name used anywhere in JavaScript or CSS (which isn’t uncommon in Rails code), and then the one that I’d like to see it do a better job on, but that is hard of course is on associations.  So, in my application, I was refactoring our “Deal” model to be “HotelDeal”.  We have a “Hotel” model and it has_many deals.  Thus in the code you’d routinely see things like “hotel.deals” to reference that association.  It didn’t handle any of those.  Not surprising, but starts to devalue the refactoring feature.

I’d submit bugs for these things. Also, I don’t know what version Chris was using, but this stuff has been getting better with recent versions.

At the end of the day, there are probably specialized tools that do each of the things that Rubymine does just a little bit better. GitX is definitely a better git/diff reader. Textmate is better for just plain editing files. CSSEdit is better for CSS. Terminal is a better shell. But for me, being able to have all of these things in one tool, and the few Rails specific things that Rubymine does provide, make up for the small things it doesn’t get right. If you give Rubymine 10 minutes, I’m sure you’ll always go back to what you were using before. However I gave Rubymine a month, and now that it’s 8-9 months later, I wouldn’t ever consider going back to Textmate.

  • Thanks BJ! I’ve made the tabs change, and am trying RubyMine out again (just spent a while with RadRails 3, which has some promise as well, but has a couple things preventing me from switching to it yet (these should be resolved by the time they go to a beta level, but at this super early pre-release stage it’s not quite baked enough).

    I agree on the dual monitors. One thing for me is that while I have the best apps for the job in TextMate (currently), iTerm, and so on, one reason I’m trying all these is I want kind of one screen-full of stuff, so windows don’t overlap and everything is just “right there”. I think the IDE’s have potential to be this solution, but some of the shortcomings in tools (their git diff vs. GitX – something I rely very heavily on for reviewing all code before I commit it), etc. may not overcome that.

    • BJ Clark

      I’ll admit, Rubymine’s git stuff is still mostly a mystery to me. I’m also pretty careful about reading code before making the commit, and I do this in GitX. But really, it’s rare enough that it doesn’t bother me to leave Rubymine. I’ve already broken the development flow to make the commit itself.

      I think Rubymine does a great job at the “1 window” concept.

  • I’ll always regret that I didn’t force you to sit down and show me how you use RubyMine while I watched. As it stands now, I’m still reluctant to put in the time to make myself productive in it. My 30-day trial expired ages ago…

    • BJ Clark

      Yeah, I mean, that’s the thing. I’m sure you could make any IDE work this well for you if you put in the time. Rubymine doesn’t do anything so bad that I can’t use it (Textmate, however, does).

  • I’ve been using it again, and I think I’m pretty sold. I agree that Cmd-B is super key. The other thing I like is that if you do something like generate a migration, the filename of the migration is a link, and thus opens it up. There are a lot of little things that are seeming to add up to be an overall win. I still need to get a few things more dialed in; and some other things are not ideal (GitX is overall better, but I’ve been using the Changes tab and Cmd-D for diffs, and it’s mostly working out). Next step is to get into their forums and start learning more, seeing how to fix/alter things that annoy me, etc.

    • BJ Clark

      Yeah, I love the migration thing. Generate a migration, click on the file, edit it, then hit cmd-r and it gives you the db:migrate rake task, which it will run and then you can go about your business. Never have to change context or focus or anything.

  • I’ve just given up on TextMate in favor of RubyMine too. See
    for why.

  • thomas

    can you provide a bigger screenshot? 690×220 is ‘kinda’ tiny. pretty please.

  • I’ve been using it again, and I think I’m pretty sold. I agree that Cmd-B is super key. The other thing I like is that if you do something like generate a migration, the filename of the migration is a link, and thus opens it up. There are a lot of little things that are seeming to add up to be an overall win. I still need to get a few things more dialed in; and some other things are not ideal (GitX is overall better, but I’ve been using the Changes tab and Cmd-D for diffs, and it’s mostly working out). Next step is to get into their forums and start learning more, seeing how to fix/alter things that annoy me, etc.

  • I work with 3 monitors, *but* I run a VM for development, and VMWare workstation 9 just won’t handle multiple monitors for Ubuntu.

    So, after reading your post I thought “Fuck it, I will install a linux boot drive to check out the extra windows”. (Not that was an adventure in itself, but I got there).

    Running natively with multiple monitors and popping the windows out to have just the editor on on screen, I worked with it for a while.

    Well, I was less impressed than I thought I would be, I thought it would be a big improvement. But Rubymine keeps the infor windows so small that on a 27″ monitor I think I have all the editing space I need in the VM.

    Maybe VMWare will sort out their Unity issue and get it working one day, but the draw of working from a VM that you can just clone for each project you work on is just too much of an advantage for me to give up.

    You had me really excited for day, so thanks for putting the idea in my head 🙂 I just thought I would post my musings in case someone else that can’t multi-monitor it is feeling sad 😛

    I do use three monitors I suppose – 27″ for the VM and two side 22″ ones for API’s/web/tools etc. Even with that I have an iPad by my side for reference books (even though I hate apple!)

    Since it has been quite a while since you wrote this, what is your setup like now?

    All the best,

    Kevin