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.
To add another project, select File | Open… and choose a folder containing the desired project. In the invoked dialog, click Attach.
RubyMine will show both projects in the Project View.
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.
Click Configure… and select the projects to be created for each Gemfile found.
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.
Manage project structure
For each added project, you can manage its structure in the Project Structure page.
Navigate through source code
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.
Switch between open projects
To switch between open projects, you can use the following commands of themenu: