Skip to end of metadata
Go to start of metadata

In the following tutorial we will 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.

0. Prerequisites

1. Open from the Welcome Screen

Open IntelliJ IDEA and choose 'Import Project' from the Welcome screen:

Select directory of your project:

Proceed with Create project from existing sources, fields Project name and Project location will be filled automatically.

Select directories to be used as project roots, you'll see as well that it's already defined as Ruby type:

You might notice that Ruby on Rails framework is detected:

NB: You'll be offered the same steps in case you go toFile - New - Project from Existing Sources

2. Configure Ruby SDK

Once you've imported your Rails app you need to configure Ruby SDK. Go toFile - Project Structure... There in Project Settings - Project - Project SDK specify Ruby SDK to be used:

NB: If the desired SDK is not present in the list, click New and select Ruby/JRuby SDK. Then proceed with adding a new local or remote SDK (the way of adding is similar to that one in RubyMine)

You can import necessary modules to your project by going toFile - Project Structure - Project Settings - Modulesand clicking on+:

If necessary, you'll be able to specify a different one Ruby SDK for that module:

You might also notice in tabFacetsthat Ruby on Rails framework was correctly detected:

  • No labels