IntelliJ IDEA 2017.3 Help

Running Rake Tasks

This feature is only supported in the Ultimate edition.

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

Use Run Rake Task command on the Tools menu, and select the desired task from the list.

To run a Rake task

  1. On the main menu, choose Tools | Run Rake Task.
  2. In the pop-up window, start typing the task name, or its part. IntelliJ IDEA shows the list of matching Rake tasks. If you want to see all the available tasks, including those without description, select the checkbox Include undocumented.
  3. Select the desired task from the suggestion list, and press Enter.
  4. In the Execute '<Rake task>' dialog box, specify the script arguments, if any, and select the desired environment from the drop-down list.

    If necessary, enable the --trace option by selecting the Full backtrace checkbox. This option is the same as in the Rake run/debug configuration; as soon as this option is set in the run configuration dialog box, it is also set in the Run Rake Task dialog box, and vice versa.

    This behavior is common for the majority of Rake tasks. However, the migration tasks behave differently. Instead of the list of arguments, one should specify the migration version. By default, IntelliJ IDEA suggests the latest migration version, while all the other migrations that exist in project, are available in the suggestion list.

    For the following migration tasks

    • db:migrate:up
    • db:migrate:down

    depending on the context where they are invoked, IntelliJ IDEA suggests by default the migration that is currently selected in the Project tool window, or open in the editor. So doing, the editor has the priority: if a certain migration is selected in the Project tool window, and another one is open in the editor, and the editor gets the focus, the default migration version will be the one in the editor .

  5. Click OK.
Last modified: 6 March 2018

See Also