Which IDEs do Rubyists Use?

In a previous article, I interviewed several well-known Rubyists about their favorite editor. Some of the readers were disappointed that the article focused only on text editors and not IDEs. So, I decided to interview Rubyists about their favorite IDE and report back my findings (we hate having disappointed readers at SitePoint…).

Before getting to the meat of the article, I’ll quickly talk about the differences between text editors and IDEs, as I found that there seems to be some confusion between these two kinds of tools.

Text Editor vs. IDE

In my article about Ruby editors, many commenters and tweeters asked about RubyMine. I replied that RubyMine is an IDE, not a text editor. But, then I got to thinking, is there really a difference between a text editor and an IDE? Or, can they simply be used interchangeably?

Based on a Beginner’s Guide to Using an IDE Versus a Text Editor, the text editor is a tool that creates and edits files that only have plain text. It is a simple way to write code. Once the code is written using a text editor, you can compile and run that code using a command-line tool.

Many text editors come with features like syntax highlighting, which makes reading the code easier, as well as enabling the programmer to compile and execute the program without the need to navigate to a command-line tool.

An IDE (Integrated Development Environment), however, is a more powerful tool that provides many features, including the text editor features.

Other features that IDEs provide are:

automatic code completion, presenting the programmer with a list of methods or variables that complete the currently typed text.

version control, allowing the programmer to commit and rollback code changes.

In truth, a text editor can be equipped with just about any feature that an IDE offers. The difference is the effort to gain the features. Text editors (like Vim, Emacs) require plugins or other modifications to gain certain IDE-like features. The skills needed to install these features are, often, advanced. IDEs typically come with features like syntax highlighting and version control integration built right in.

To IDE or Not to IDE?

I spoke to 100 Rubyists. Some replied explicitly that they don’t use IDEs, while others mentioned what we call text editors. For those whom replied with a text editor preference, I am including that in the No IDE option.

Here are the results of the interviews:

No IDE (Rubyists not favoring IDEs)

RubyMine

Aptana Studio

IntelliJ IDEA

Kuso IDE

No IDE was, by far, the most preferred choice, being mentioned by 74% of the interviewees. The charts below tell the tale:

As you can guess, I spoke to two of the most well-known Rubyists: Yukihiro Matusmoto (Matz) and David Heinemeier Hansson (DHH). If you don’t know, Matz is the creator of Ruby as a language, and DHH is responsible for Ruby on Rails. Matz prefers Emacs, while DHH uses the original version of TextMate. I find it very interesting that two pillars of Ruby don’t use IDEs, surely something to consider when choosing your toolset.

In the Ruby editors article, I had a chance to talk a bit about Vim, the editor of choice for Rubyists based on the sample set I interviewed. While here, I find myself a bit embarrassed when it comes to this part of the article, since the preferred IDE for Rubyists is No IDE!

RubyMine

Although No IDE was, by far, the choice of the Rubyists interviewed, I cannot end this article without talking about the features of the most-chosen Ruby IDE, at least for the sample interviewed in this article.

From the charts above, we can see that RubyMine is the IDE of choice for Rubyists. But, what’s so special about RubyMine?

Let’s ask Natasha, who used TextMate and Sublime Text as the editors of choice before starting to use RubyMine. Natasha states that there is no going back, and mentions some features that she loves about RubyMine.

One of those features is click and follow. Here, when you click on a function, RubyMine will take you to the function being called. This feature is very useful if you have multiple functions with the same name, and residing in different files or folders.

Another feature RubyMine provides is Git annotate. This feature is nice when working on team projects. It allows you to see who was the last person on the team to write or change a function, for instance. It makes it very easy to get in touch with that person if you have any question on why such changes were made.

Another Git feature is Git compare. This wonderful features allows you to compare the current file with the same file on a different branch. If you want, you can also make the comparison with a previous version of that file on the same branch. That could be very, very useful.

Jorge also used to use TextMate before falling in love with RubyMine. Jorge really loves the Refactoring feature of RubyMine. This feature enables you to automatically execute well-known refactorings, such as rename or extract method/variables, quickly cleaning up the code.

RubyMine also offers the capability of Splitting views, such that you can split the editor in independent views, while also keeping a set of tabs opened in each view. For instance, you can have the code and its test displayed in parallel.

IDEs typically have a ton of integrated tools, and RubyMine is no different. You can run your web server or rake tasks within RubyMine. Run you tests with the built-in test runner, then easily browse to the failing tests. Also, code completion is a huge benefit, where RubyMine almost finishes your code thoughts before you do.

Are you surprised the more Rubyists don’t use an IDE? After reading this article, are you ready to try one out for yourself? Why do you think that most Rubyists prefer to go with editors rather than IDEs? Looking forward to your thoughts on that.

Free Guide:

7 Habits of Successful CTOs

"What makes a great CTO?" Engineering skills? Business savvy? An innate tendency to channel a mythical creature (ahem, unicorn)? All of the above? Discover the top traits of the most successful CTOs in this free guide.

Honestly I think that autocompletion gets in the way more often than it actually helps. To me it falls in the same realm as autocorrect on phones, well meaning but wrong often enough that I turn it off before I throw my phone out a window.

The thing is that Ruby is a straightforward enough language that often times you won't need the tooling. Java, on the other hand, thrives on being a cryptic pile of noun-based mayhem that requires an IDE to have a prayer of understanding what madness has happened there. If your language of choice requires an IDE to get anything done, you should really be reconsidering that language.

As to why I tend to use Vim

It forces me to actually get to know the language, read through the syntax, and actually understand what's going on. I only ever make autocompletion, macros, and snippets whenever I know what I'm doing so my editor evolves organically as I do in a language. The newer I am to and the less I use a language, the less I should touch fancy tools which abstract me from learning it better. The earned productivity is well worth the initial uphill.

Combine that with vim-slime and tmux and I effectively have all the features you could want out of something like Lighttable and other REPL heavy development cycles. I've heard there are cleaner ways to do this in Emacs, but I haven't had a good enough block of time to critically evaluate that.

Why I use Sublime

Because I fear for my life pair programming with those not so vim-inclined

Rubymine helps my colleagues to navigate around all parts of an application much easier. There is much more overview. For myself I run into the problem that running Rubymine drains the power of the battery of my MBP in less than two hours. So if on I trip, I do not dare to open Rubymine. Soo, i'm open for any battery-friendly editors

I still feel Sublime is the best one to go for, i personally use sublime for Ruby and Rails. sometimes people do get afraid of Vim only because it requires lot of typing but eventually people find this by themselves which is one good for them.Thanks for this article.