RubyMine 2016.1 Help

Running Rails Scripts

RubyMine enables you to execute Rails scripts using a single menu command. By default, RubyMine 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

  1. On the main menu, choose Tools | Run Rails Script. Run Rails Script dialog box is displayed.
  2. 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 browseButton.png (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.

    ruby_runRailsScript.png

  3. In the Arguments field, specify the script's arguments, if any. The arguments should be separated with spaces.
    Alternatively, open the Edit Arguments dialog box by clicking the editor button editorIcon.gif, or pressing Shift+Enter, and type the list of arguments.
  4. Click Run.

To rerun a Rails script with new arguments

  1. In the Run tool window, click the desired Run Rails Script tab.
  2. In the toolbar of the Run tool window, click editArguments.png. Edit Command Line Arguments dialog box is displayed.
  3. In the Edit Command Line Arguments dialog box, type the new arguments separated with spaces, and click OK.
  4. In the toolbar of the Run tool window, click rerun.png, or press Ctrl+F5.

See Also

Last modified: 21 July 2016