Running Ruby/Rails-Specific Commands
IntelliJ IDEA 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. IntelliJ IDEA allows you to use a single entry point for various operations - Run anything (Double Ctrl):
Run Ruby/Rails-specific commands
Run anything allows you to execute various Ruby- or Rails-specific commands, for instance:
Tests (Test::Unit, Rspec, Cucumber, etc.)
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:
First, if offers a list of predefined actions that include available Bundler commands, Rake tasks, Rails generators, etc.:
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:
Running the Rspec test:
Deploying an application using Capistrano:
You can see that the icon next to the specified command (, , ) identifies the corresponding run configuration. After running this command, IntelliJ IDEA adds this configuration to temporary configurations.
If the specified command does not match to any predefined action or a default configuration, IntelliJ IDEA runs this command in a terminal: