RubyMine 2018.2 Help

Working with Multiple Projects in RubyMine

RubyMine allows you to work on multiple projects simultaneously. You can open several projects in two ways.

  • In separate windows. In this case, projects are independent and do not share any information.
  • In one window. This can be useful when one project uses another.

In this topic, we’ll consider working with multiple Ruby projects opened in one window.

Imagine that one project is already opened and displayed in the Project View.

multiple projects project tool 1

To add another project, select File | Open… and choose a folder containing the desired project. In the invoked dialog, select Open in current window, enable Add to currently opened projects and click OK.

multiple projects open dialog

RubyMine will show both projects in the Project View.

multiple projects project tool 2

To delete the project from the Project View, right-click it and select Remove from Project View.

Opening Several Ruby Projects

When you open a folder containing several subfolders, RubyMine detects Gemfiles and displays a message that suggests you to process subfolders as Ruby projects.

multiple projects gemfiles warning

Click Configure… and select the projects to be created for each Gemfile found.

multiple projects gemfiles dialog

Check Don’t ask again to disable automatic Gemfile detection. If necessary, you can enable the Create projects for new Gemfiles option to process folders with new Gemfiles as Ruby projects automatically.

To create a project later manually, right-click a corresponding folder in the project view and select Mark Directory as | Ruby Project Root. Note that this command is available only for projects containing Gemfiles.

Managing Project SDK

For all added projects, you can manage Ruby SDK separately on the Ruby SDK and Gems page of the Settings/Preferences dialog (Ctrl+Alt+S).

multiple projects sdk

Managing Project Structure

For each added project, you can manage its structure in the Project Structure page.

multiple projects structure

Navigating Through Source Code

multiple projects navigating

Running Commands in Project’s Context

RubyMine provides the Run Anything feature that allows you to run various run/debug configurations, rake tasks, rails generators and so on. Any command launched using Run Anything is run in a context of the current project root directory. To run commands in a context of the required project, select this project in the Project View.

multiple projects selected project
Last modified: 31 August 2018