RubyMine 2018.2 Help

Running Anything

RubyMine provides different ways to run scripts and applications, rake tasks, rails generators, and so on. You can run all of these actions using shortcuts, menu commands or a terminal. RubyMine allows you to use a single entry point for various operations - Run anything:

run anything example

Invoke the Run Anything Dialog

To invoke the Run anything dialog, do one of the following:

  • Double-press Ctrl.
  • Click the icons actions run anything svg button in the toolbar.
  • Press Ctrl+Shift+A, type Run anything and press Enter.
run anything empty

In this dialog, you can perform the following actions:

Type a question mark to see hints for the available commands:

run anything help

You can also start typing the query to see the available commands and run/debug configurations:

run anything query

Use the icons general gearPlain svg button to configure action groups used for search.

Running/Debugging an Application

To run an application using a specific run/debug configuration, start typing the configuration name, select it, and press Enter:

run anything run config

To debug an application, hold down the Shift key when running a run/debug configuration (the dialog title will be changed to Debug):

run anything debug config

Running Ruby/Rails-Specific Commands

Run anything allows you to execute various Ruby- or Rails-specific commands, for instance:

You can also run Rails and IRB consoles, or change the project SDK using commands dependent on the utilized version manager (RVM, rbenv, etc).

Run anything executes commands in the following way:

  1. First, if offers a list of predefined actions that include available Bundler commands, Rake tasks, Rails generators, etc.:

    run anything bundle install
  2. If the specified command is not found in the predefined actions, Run anything tries to match this command to any default run configuration. Below are few examples:

    • Running the ruby interpreter for a specific script:

      run anything ruby script
    • Running the Rspec test:

      run anything rspec
    • Deploying an application using Capistrano:

      run anything capistrano

    You can see that the icon next to the specified command identifies the corresponding run configuration. After running this command, RubyMine adds this configuration to temporary configurations.

  3. If the specified command does not match to any predefined action or a default configuration, RubyMine runs this command in a terminal. For instance, this can be any standard command-line utility (such telnet, ssh, pwd):

    run anything telnet

Running Commands in the Current Context

Any command launched using Run anything is run in a context of the current project root directory. If necessary, you can run commands in the current context, which can be determined by a project or folder selected in the project tree, a project file currently opened in the editor and has focus, etc.

To launch a command in the current context, hold down the Alt key before running the command (the dialog title will be changed to Run in Context):

run anything context

This functionality can be useful for launching scratch files because they are placed outside of the project’s root folder.

Opening Recent Projects

The Run anything dialog allows you to reopen recent projects. To do this, type the open command, select the required project in the list and press Enter:

run anything open
Last modified: 6 August 2018