Rails console
Run a console: Tools | Run Rails Console or
RubyMine allows you to run the Rails console and interact with your application without leaving the IDE. You can use completion and navigation capabilities, run the console with additional options, and so on.

Before using the Rails console, make sure that the rails gem is installed for your interpreter.
To run the Rails console in RubyMine, perform the steps below:
Do one of the following:
Press Ctrl twice and type the question mark in a popup. Then, find the
rails c
command in a list and press Enter. If necessary you can pass additional parameters, for example:rails c --sandbox
Go to Tools | Run Rails Console.
(Optional) In the invoked dialog, select the required environment and click OK.
tip
Enable the Use Zeus Server option to run the console with the Zeus server.
RubyMine will load the Rails console with the selected project SDK.

Note that a console can be launched on a remote SDK.
After you run the console for the first time, RubyMine creates the dedicated run configuration. If necessary, you can change the created configuration to provide additional options: change the environment, protect the database from changing data, and so on. For example, to use the --sandbox
option to run the console, perform the steps below:
Open the Run/Debug Configurations dialog in one of the following ways:
Press CtrlShift0A, start typing Edit Configurations, select it from the list and press Enter.
Expand the run/debug configuration selector on the main toolbar and select Edit Configurations.
In the invoked Run/Debug Configurations dialog, select the created Rails console configuration in the Ruby Console group and specify the Console script arguments option in the following way:
console --sandbox
Click OK.
You can now run this configuration and use the Rails console without changing the database.
RubyMine allows you to run source code from the editor in the Rails console. To do this, perform the following steps:
Open the required Ruby file in the editor (if necessary, select a fragment of code to be executed).
In the main menu, go to Tools | Load file/selection into IRB/Rails console.
tip
You can perform the following actions in a console:
Execute commands
Type commands in the console and press Enter to execute them.
Multiline editing
Type a line of code and press ShiftEnter to move the caret to the next line without executing a command.
Complete names
Use basic code completion CtrlSpace to complete names of classes, methods, and so on.
Navigate through history
Use the 0↑ and 0↓ arrow keys to scroll through the history of commands and execute the required ones.
Navigate to source code
To navigate to the initial declaration of a symbol and symbol's type, place the caret at the desired symbol and press Ctrl0B.
GifView quick documentation
To get quick information for any symbol or method signature, place the caret at the desired symbol and press Ctrl0Q.
Thanks for your feedback!