RubyMine 7.0.1 Web Help

Rails projects are intended for productive web development with Ruby on Rails. For the Rails versions 2.3 and higher, RubyMine suggests using templates for customizing the application structure or performing some routine tasks on project creation.

To create a Rails application
  1. On the main menu, choose File | New Project, or click the New Project button in the Welcome screen. Create New Project dialog box opens.
  2. In the Create New Project dialog box, specify the project name and location. In the Project type drop-down list, select either Rails application, or Rails mountable engine. Click OK. The Rails Application Settings dialog box opens.

    If the new project is being created in a directory that already contains a Rails application, RubyMine suggests you to create a new application, or use the existing one.

  3. In the Rails Application Settings dialog box, specify the following:
    • In the Ruby SDK drop-down list, select the Ruby SDK you want to use from the list of available Ruby interpreters, installed on your computer. Refer to the section Configuring Ruby SDK for the procedures of installing interpreters.
    • In the Rails Version drop-down list, select the desired Rails version from those installed on your machine.

      If RubyMine cannot detect Rails installation, click the browse button browseButton, and select the desired Rails version to be installed. RubyMine downloads and installs the corresponding rails gem.

    • If your choose Rails 2.3 or higher, you can specify an application template. To do that, just type the fully qualified path to the desired template file in the Rails Template field, or click the ellipsis button, and locate the template file in the file system.
      For the elder Rails versions, this field is disabled.
    • For Rails version 3.1 or higher, you can select the JavaScript library to be used to generate the target application.
    • Specify which database will be used for your new application. By default, RubyMine suggests using SQLite3. If you want to use a different database, select the Preconfigure for the selected database check box, and choose the desired database from the drop-down list.
    • Specify whether RubyMine should generate the testing directory structure and template files. If you leave the check box cleared, which is suggested by default, RubyMine will produce the test folder, marked as a test root rootTest, with all the necessary infrastructure. If you select this check box, the testing infrastructure will not be generated.

    Click OK. The generator executes and displays its output in the console of the Run tool window.

  4. Configure project content roots, Ruby SDK and gems.

    Please note the following:

    • For further development, the daemon of your database must be running in the background.
    • If you want to preview your Rails application output as you work, you have to launch the Rails server.

See Also

Concepts:

Procedures:

Language and Framework-Specific Guidelines:

Reference:

External Links:

Web Resources: