Opening a Rails Project in IntelliJ IDEA
In this section:
- Opening from the Welcome Screen
- Configuring Ruby SDK
- Importing a module and configuring a separate SDK for it
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:
Select the directory of your project:
Then follow the steps of the wizard.
Configuring Ruby SDK
Then, from the pop-up window, choose the type of SDK to be configured (local, remote or an existing one):
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:
- In the Modules of the Project Structure dialog, click .
- Choose Import Module from the pop-up menu:
- Specify the directory of the module to be imported, and follow the steps of the wizard.
You see that the imported module has a different SDK:
Note also that IntelliJ IDEA has correctly detected the Ruby on Rails framework.