What is the Best IDE for Developing in Ruby (on Rails)?
By: Tremaine Eto
Tags: Technology, Software Engineering, Software Development, Programming, Ruby

RubyMine by IntellIJ

From JetBrains

RubyMine bills itself as “the most intelligent Ruby and Rails IDE”. IntellIJ by JetBrains is also a heavy hitter, consistently being in the conversation for best IDE for multiple languages. With that said, RubyMine is a very natural first option to explore. Among the features that the site touts are:

Download here

Free 30-day trial

$89.00 (USD) for first year; $71.00 for second; $53.00 for third

First-class support for Ruby and Rails, JavaScript and CoffeeScript, ERB and HAML, CSS, Sass and Less, and more

Language specific-aware syntax & error highlighting, code formatting, code completion, and quick documentation

Smart search to jump to any class, file or symbol, or even any IDE action or tool window

MVC-based project view and model, class, and gem dependencies diagrams

Code inspections verifying your code for many types of possible errors and providing on-the-fly improvements with quick-fix options

Debugger with a graphical UI for Ruby, JavaScript, and CoffeeScript

UI for working with Git, SVN, Mercurial and other version control systems

If you’re used to Sublime then continue using it. It’s got everything you need. However, for a full IDE, RubyMine is the only real choice. Most people use some basic code editor though, varying from vim to Atom, Sublime, or VSCode.

— /u/dougc84 on /r/ruby

I find RubyMine to be bloated and I prefer vscode to it (as does the rest of my team). So, it’s not the “only real choice”, it’s a matter of opinion. At the end of the day, all that matters is what you enjoy using and what helps you be productive.

— /u/astupidnerd on /r/ruby

Like, rubymine does a lot of stuff out of the box which is kinda tricky to customize your editor to do. Stuff like source lookup — you can totally do it with ctags or something, but it’s far beyond a beginner setting up their vim/emacs.

— /u/twinklehood on /r/ruby

I’ve been doing Rails almost since the beginning. Since I grew up on vi, I had a heavily-customized vim setup. Then I discovered Sublime, which, out of the box, looked and worked like I was trying to get vim to. I’ve been using that for about 10 years now. A lot of people mention RubyMine. I like JetBrains’ products. IntelliJ saved my sanity for the (thankfully, brief) time I had to do Java development. If you’re just starting out, RubyMine might help you understand the Ruby/Rails development workflow. After you get used to it, though, it’s a pretty heavy tool compared to a text editor and a terminal. That all being said, I had to do a deep dive to fix a third-party gem that has fallen out of date, and RubyMine’s debugging capabilities let me drill down into the stack, and inspect what was going on, without needing to get into the weeds of stepping with pry. (Though I should probably learn those commands anyway.) One of these days, I’m probably just going to spend the money on an everything-account with JetBrains. I will be writing an ASP.NET Core app, on Windows (work) and Mac (personal), and I’m going to try using Rider in anger for that one.

— [deleted] on /r/ruby

Rubymine. It’s expensive, but because it’s a payed subscription, you get the benefit of frequent updates, support and stability when compared to IDEs like Eclipse (for Java dev) which crash much more often. And Sublime, emacs, etc. aren’t IDEs, I dunno how people use those for professional development. Personal preference but I find the “plugins” for sublime super awkward. If you’re starting out, sure go nuts with those. Might as well use vi. But I’ve worked with people who swear by those. Personally, I prefer something like Rubymine which has an interactive debugger.

— /u/ferritboy on /r/ruby

… I’m a lead and have used RubyMine from day one, it’s just so much easier to traverse the stack and debug code in a proper IDE. But to this day I’ve never worked with another person who uses RubyMine and they do great work.

— /u/cheeeeeese on /r/ruby

I’ll chime in for RubyMine as well. It has a built in debugger and supports a LOT more than just Ruby (for editing at least). It’s one of the few IDEs I’ve seen that supports Cucumber well.

— /u/Jdonavan on /r/ruby

… I work as a full time Ruby developer and have tested many different options. RubyMine offers by far the most complete experience out of the box — with linters, jumping to function definitions, integrations with Rubocop (detects ugly code) and many, many others. The only catch is that it costs money. That in itself is not that horrible but it’s hard to recommend a newbie to pay for an IDE. If you find it’s price tag too unfriendly — Atom with plugins (linter + Ruby linter + Rubocop) gets the job done. I have used it professionally before at the very least. Catch is that out of the box it offers only a fraction of RubyMine features and it’s not nearly as seamless.

— /u/ziptofaf on /r/ruby

VSCode

Public domain

VSCode is popular in large part because it’s free, but also because it’s a very competent editor across multiple languages. For Ruby, that is no different.

Download VSCode here

Download plugin here

Free

From plugin site, features include:

Automatic Ruby environment detection with support for rvm, rbenv, chruby, and asdf

Lint support via RuboCop, Standard, and Reek

Format support via RuboCop, Standard, Rufo, and RubyFMT

Semantic code folding support

Semantic highlighting support

Basic Intellisense support

Code autocompletion

Navigation

Debugging tool

Interesting, I use VS code but it is noticeably slower than atom for me. For large fixture files I have to open them in atom, if I attempt to open them in vscode it freezes. This might have more to do with extensions than the actual editor though.

— /u/Kritnc on /r/ruby

The auto completion is pretty garbage compared to rubymine, you can’t run your tests within vs code itself, different test environment settings, better code searching/peaking which includes all your libraries , syntax highlighting is much more intuitive and recognizes when a string is actually html or sql or whatever. Honestly but the deal breaker for vs code for me was the fact it does not recognize heredocs meaning all the syntax highlighting is [expletive] for the rest of the document if you use an apostrophe. Someone’s made an issue for it.. 2 years ago and nothing has been done about it because open-source. That said I don’t know if I’d use it if I had to pay for it myself

— /u/pVom on /r/ruby

VS Code has the best features imo. Feels a factor of a million more responsive than Rubymine. Sublime and Atom are similar in feel and function, but lack the same level of community activity. It’s very easy to go from Sublime or Atom to VS Code; the latter two seem clearly inspired by Sublime. The built in terminal is extremely valuable (without needing any extensions). There’s a huge amount of community support, and customizing the IDE seems easier / more intuitive than others I’ve used. I’ve got a bunch of plugins I don’t really even think about anymore because they are just part of my workflow. I use a plugin to use VIM editor commands from inside VS Code.

— by [deleted] on /r/ruby

Visual Studio Code with the Ruby plugin is a good starting point, but if you get serious, there’s nothing better than RubyMine.

— /u/rainynight65 on /r/ruby

Sublime

By Source (WP:NFCC#4), Fair use, Wikipedia

Sublime is a simple yet powerful text editor where you can get going in mere minutes, and for Ruby, it’s often good enough for a lot of purposes.

Download here

Free

Syntax highlighting

File browser tab

Jump to file keyboard shortcuts

You can still use Sublime if you like. I do most of my Rubying in it. The LSP plugin with Solargraph gets you about as much autocomplete as you’re gonna get with Ruby. Terminus is also helpful, you can use it to pop open a quick terminal for rake tasks, and as a handler for the Sublime build system output, which I wire up to run RSpec with one keypress. VSCode is a bit slicker, but Sublime can match most of the important functions, and at an order of magnitude faster speed. I don’t have too many plugins or specialized config but here’s some snippets that might help get you going. Plugins - Gitignored File Excluder - LSP - Terminus - Origami - SublimeLinter - TypeScript LSP {

"auto_show_diagnostics_panel": true,

"show_code_actions_bulb": true,

"clients": {

"lsp-tsserver": {

"enabled": true

},

"ruby": {

"enabled": true

},

}

} Here’s my quick and dirty build task for running RSpec (opening in a terminus view) {

"title": "RSpec",

"cmd": ["bundle", "exec", "rspec"],

"working_dir": "${project_path:${folder}}",

"selector": "source.ruby.rspec",

"target": "terminus_open",

"panel_name": "RSpec",

"auto_close": false,

"variants": [

{

"name": "Current File",

"cmd": ["bundle", "exec", "rspec", "$file"],

}

]

} I use asdf for managing Ruby and Node versions, and I add solargraph to my $HOME/.default-gems so it’s always available when I install a new version. I believe rbenv and rvm have a similar feature. Note, I use Linux and sometimes MacOS. If you’re on Windows/WSL you’re probably better off with VSCode and its special WSL plugins

— /u/milkohol on /r/ruby

I use SublimeText, mostly cause I have for years and it works for me, I couldn’t say if it’s the best of things currently available (neither Atom nor VS Code existing when I started with ST). Things I find invaluable include proper syntax highlighting (ruby, html, and css, including erb and scss), the file browser tab on SublimeText, and the command-p jump-to-any file. I don’t know if vim/MacVim has similar things or can be set up to have them.

— /u/jrochkind on /r/ruby

Atom

From Atom Blog

Atom is another simple text editor that is a direct competitor to Sublime Text.

Download here

Download ide-ruby here

Free

With ide-ruby, you get (per the website):

Completion suggestions

Outline view

Jump to definition

Linting using rubocop

Atom is very fast, it’s also very simpl[e]. You can download it and get going. VSCode has lots of things you expect a full IDE to have, and lots of settings to play with. Not worth it when the goal is to learn ruby first, then worry about a good text editor that fits.

— /u/TODO_getLife on /r/ruby

I use atom too, mostly because I’m too lazy to learn vscode’s shortcuts. [speaking about extensions] I think I only use block-highlight, haven’t found any other useful ones.

— /u/ImAJalapeno on /r/ruby

Atom is slower than all other editors. But it’s not really noticeable until you’re in a large project with hundreds of thousands of files. VSCode starts off just as simply as Atom: only the base plugins are installed.

— /u/dougc84 on /r/ruby

If you decide to go the Atom route, this article suggests some plugins worth using: https://medium.com/@distillerytech/moving-from-rubymine-to-atom-is-it-worth-the-effort-5d551efcb49d

— /u/ziptofaf on /r/ruby

Vim

GNU General Public License

For users who are already used to (and to those who are fiercely loyal to) Vim, fear not: Ruby works great with Vim.

Download here

vim-ruby download here

According to vim-ruby repository, features include:

Syntax highlighting

Indentation

Omnicompletion

Various useful tools and mappings

Free

Your best editor is the one you know best. In my case that would be vim, and that was only after having invested the time into learning it .

— /u/tobeportable on /r/ruby

I use vim, but I will say this: if you’re starting from absolute scratch with both ruby and vim, you’re basically starting the game on legendary/elite mode, because you’ll be learning two things at once. Vim is great, but it has an extremely high learning curve, compared to a plain text editor. It’s not impossible… I did it, but I’m a glutton for punishment, and I have that kind of temperament where I don’t necessarily mind being endlessly frustrated until I hit on a solution (I find it beneficial, actually, it cements things in your memory). Just so you know going in.

— /u/j4yne on /r/ruby

Vim is fairly popular in ruby community with a bunch of good plugins, so I’m not sure if there is any big need to change. Upcase has good intermediate level content that helped me when switching to rails dev and using tmux/vim

— [deleted] on /r/ruby

I think vim/tmux make for an awesome ruby editor. You can read the help docs and go as deep as you want, but to get started a few plugins (like NERDTree as you mentioned) and off you go. Unless you’re having issues using vim, I’d say stick with it. We’re all very blessed with some amazing text editors to choose from. All of the one’s listed here are very capable. The important thing is becoming proficient with whichever editor you choose.

— /u/azendent on /r/ruby

Emacs

GNU General Public License

You simply can’t mention Vim without Emacs, lest you anger the Emacs users. It turns out that Emacs works nicely with Ruby as well for those current Emacs users.

Download here

Useful resource here to get started with Ruby with Emacs

For me it’s emacs with robe, ruby-mode, ruby test and some others. You have a running repl which loads and knows you’re whole project and therefore can give you arguably better tooling than static analyzers in such a dynamic language. Plus it’s really easy and convenient to test out some code in the repl to get instant feedback. I’ve also tried vim and was happy with it, too. For ruby mine, though, I don’t really see the benefit over cheaper and more lightweight editors.

— /u/FabiusII on /r/ruby

If you are serious, install Emacs and spend two weeks learning eLisp. After that, you won’t need any other editor or IDE for the rest of your life.

— /u/aarkerio on /r/ruby