Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

It's common for a developer to work on several projects at once. Keeping that in mind RubyMine allows working with several projects in separate windows or even in one window. Being opened in different windows the projects are independent, and cannot share information, except for the Clipboard operations. But RubyMine also allows you to have one main project within which you can add as many projects as you like in one IDE window. This tutorial aims to show how several projects can be managed in one window.

1. Opening Several Projects in One Window

Any opened project may become the main project after another one is added. The main project is always placed at the top of the list of projects in all views and in the Settings. So first of all open the project supposed to be the main one (railsapp1).

To add another project (railsapp2) to the main one, go to File | Open... menu, and in the Open Project dialog check the Open in current window -> Add to currently opened projects option:

The railsapp2 project appears in the tree and if you expand the node, you can see the whole structure of the project. The Ruby SDK related to the project is available as well:

Once the project was added you can delete it from the list. To remove any project except the main one navigate to it in the project tree, right-click it and choose the Remove from Project View option:

If the window with several projects was closed you can reopen it with a help of File| Open Recent menu. Multiple projects will be separated by a comma started with the main one:


Please aware that you can add projects to the main project only one by one. You cannot add any project from File | Open Recent... menu. Please always use File | Open... menu. You can also add a new project to the list with a help of File | New Project... menu.

2. Multiple Run Configurations

The default Run Configuration is created with the name of the project as a postfix.

A new run configuration will be created for the project from which you run a script or a test

3. Manage SDK and Gems

To change the settings of Ruby SDK for a project, go to the Tools | Ruby SDK and Gems dialog. All projects will be displayed in right area. Select a project and then select an SDK.

All SDKs are available with related gemsets in the list. To add a new SDK, click + under the list.

Selecting an item means that you choose an SDK for the currently selected project. Install/Update Gems will be invoked for the currently selected SDK.
To install/update gems, press + under the list of gems.

4. Navigation

Files from all opened projects are available for navigation. To navigate to a class, open Navigate | Class... and the name of the project will help to choose which file is the destination.

To navigate to File open Navigate | File...

5. Use Rails Generators, Bundler, Rake tasks, Diagrams

To run Rails Generator, first you need to set the context. Selecting a context means that a project is selected in the project tree, a file from this project is opened in the editor and has focus.

For example, select the project before invoking the generator's list.

Run Bundle install

Or any Rake task

Note that a new rake Run configuration will be displayed in the list with the project name as a postfix.

6. Running, Debug, Run Tests, Run with Coverage and e.g.

To run/debug a rails application, use one of the Run configurations

To run a test, use default rake tasks in the run configurations, or create a new one. Creating a new run configuration requires choosing the context first.

7. Version Control

VCS settings are available for each project.

8. Deployment

Deployment settings are defined per project. When you deploy to a remote host, you can set the mapping in Settings for each project if you need.

When you use the Capistrano framework, for example, just select the context and capify the application. Then Capistrano's tasks will be available if the corresponding project have a context.

  • No labels