Running Rails Scripts
IntelliJ IDEA enables you to execute Rails scripts using a single menu command. By default, IntelliJ IDEA suggests the scripts that reside in the [<project name>]/script directory of your Rails application .
Results for each script are displayed in its own Run Rails Script tab of the Run tool window, where you can review the script output, change arguments if necessary, and rerun the script.
To run a Rails script
On the main menu, choose Run Rails Script dialog box is displayed..
In the Script field, specify the desired script. If the script resides in the [<project name>]/script directory, type its name only. If the script resides in another directory, type its fully qualified name.
Alternatively, click the browse button (Shift+Enter) and select the necessary location in the dialog that opens. Note that this dialog displays only the contents of the [<project name>]/script directory.
In the Arguments, if any. The arguments should be separated with spaces.
Alternatively, open the Edit Arguments dialog box by pressing Shift+Enter, and type the list of arguments.
To rerun a Rails script with new arguments
In the Run tool window, click the desired Run Rails Script tab.
In the toolbar of the Run tool window, click . Edit Command Line Arguments dialog box is displayed.
In the Edit Command Line Arguments dialog box, type the new arguments separated with spaces, and click OK.
In the toolbar of the Run tool window, click , or press Ctrl+F5.