RubyMine 6 for component-based Ruby and Rails applications

December 31, 2013 Stephan Hagemann

I have previously written about how to use IntelliJ to set up multi-project support in RubyMine. I am happy to say that that hack is no longer necessary. Multi-project support was built into RubyMine 6! It makes component-based Ruby and Rails applications with multiple unbuilt gems and engines even nicer to develop.

Before multi-project support tests for components would not run without problems in RubyMine. Multi-project support fixes this and you no longer have to open one RubyMine window for every component you are working on.

How to use multi-projects in RubyMine 6

It is pretty simple to enable multi-project support in your project:

  1. Open your application
  2. Open your gem/engine as a project and select “Open in current window” and check “Add to currently opened projects”
    How to open a gem/engine as a subproject
  3. If you are running RubyMine “Test source”. This sets your gems and engines up to run their tests properly. 6.0.2 has fixed the issue.
  4. Repeat steps 2 and 3 for all your gems and engines
  5. Run all the tests from all your components from one RubyMine window.

Fixing searches

RubyMine adds your engines and gems as libraries. As such they will not be searched in fuzzy searches. To fix this check the box “Include non-project files” at the top of the search box. When using shortcuts you can quickly check that box by repeating the shortcut with which you opened the box. In my case that is command + shift + o.

Make fuzzy search find gem/engine files

Summary

RubyMine is a great editor for Ruby and Rails projects. RubyMine 6 makes a huge step in supporting component-based Ruby and Rails applications properly.

About the Author

Biography

Previous
Copying text to the clipboard in Ember.js with ZeroClipboard
Copying text to the clipboard in Ember.js with ZeroClipboard

If you’re used to working with Backbone.js, you may be accustomed to writing your own render method for you...

Next
Link: Ore, when 'bundle gem' isn't cutting it.
Link: Ore, when 'bundle gem' isn't cutting it.

I often write small gems to encapsulate libraries, and I always want them set up in a particular way, espec...