RubyMine 2019.2 Help

Working with Multiple Projects

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.

a project tree with one project

To add another project, select File | Open… and choose a folder containing the desired project. In the invoked dialog, click Attach.

Open the project in the current window, new window, or attach it to the existing project

RubyMine will show both projects in the Project View.

a project tree with several projects

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

Open several Ruby projects

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

gemfile warning

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

gemfiles without projects

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.

Manage 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.

Ruby SDK and Gems page for the specified project

Manage project structure

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

the project structure page

Navigate through source code

navigate to class window

Run 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.

a project selected in the project tree

Switch between open projects

To switch between open projects, you can use the following commands of the Window menu:

  • Window | Next Project Window Ctrl+Alt+]
  • Window | Previous Project Window Ctrl+Alt+[
  • Window | <ProjectNameOrLocation>
Last modified: 5 September 2019