IntelliJ IDEA 2017.3 Help

Opening a Rails Project in IntelliJ IDEA

This feature is only supported in the Ultimate edition.

The following is only valid when Ruby Plugin is installed and enabled!

In this section:


In this tutorial we'll learn how to open already existing Rails project in IntelliJ IDEA for the first time (next time you'll be able to open it in a normal manner) and configure Ruby SDK for it.


Before you start working with Ruby on Rails, make sure that Ruby plugin is installed and enabled. The plugin is not bundled with IntelliJ IDEA.

Also make sure that the following prerequisites are met:

  • Ruby SDK is downloaded and installed on your machine.
  • The required framework SDKs are downloaded and installed on your machine.

Refer to their respective download and installation pages for details:

Opening from the Welcome Screen

Open IntelliJ IDEA and choose Import Project from the Welcome Screen :

ij welcomeScreen

Select the directory of your project:

ij select project dir

Then follow the steps of the wizard.

Configuring Ruby SDK

Once you've imported your Rails application, you need to configure a Ruby SDK. To do that, choose Project Structure... on the File menu (or click projectStructure on the main toolbar).

Then, under the section Project Settings, click Project and specify Ruby SDK to be used:

ij configure ruby sdk

In the desired SDK is not present in list of the available SDKs, click New, and select Ruby SDK or JRuby SDK:

ij configure ruby sdk new

Then, from the pop-up window, choose the type of SDK to be configured (local, remote or an existing one):

ij configure ruby sdk new1

Importing a module and configuring a separate SDK for it

IntelliJ IDEA enables you to import an existing module. This is how it's done:

  1. In the Modules of the Project Structure dialog, click add.
  2. Choose Import Module from the pop-up menu:
    ij import ruby module
  3. Specify the directory of the module to be imported, and follow the steps of the wizard.

IntelliJ IDEA enables you to specify an SDK other that the project SDK. To do that, select the imported module, in the Gems tab click add, and then select the desired interpreter from the pop-up menu:

ij import ruby module2

You see that the imported module has a different SDK:

ij import ruby module3

Note also that IntelliJ IDEA has correctly detected the Ruby on Rails framework.

Last modified: 6 March 2018

See Also

Language and Framework-Specific Guidelines:

External Links: