RubyMine 2017.1 Help

Interactive Console

Tools | Run IRB Console

Tools | Run Rails Console


In this section:

Important notes

  • IRB and/or Rails consoles appear in the separate tabs of the Run tool window every time you choose the corresponding command on the Tools menu.
  • An interactive console is divided into two panes: the lower pane serves for user input, the upper pane displays results and messages.
  • Rails console is only available for the Rails applications.
    IRB is available for both pure Ruby projects, and Rails applications.
  • Use up and down arrow keys to browse through the history of executed commands, and repeat the desired ones.
  • Color and font scheme of a console is configurable on the Console Colors and Console Fonts pages of the Colors and Fonts editor settings.

Toolbar

ItemTooltip and shortcutDescription
rerunConsole Rerun console
Ctrl+F5
Click this button to terminate the current process and launch the new one.
/help/img/idea/2017.1/stop.gif Stop
Ctrl+F2
Click this button to stop the current process.

Clicking the button once invokes soft kill allowing the application to catch the SIGINT event and perform graceful termination (on Windows, the Ctrl+C event is emulated). After the button is clicked once, it is replaced with /help/img/idea/2017.1/icon_run_tool_window_kill.png indicating that subsequent click will lead to force termination of the application, e.g. on Unix SIGKILL is sent.

close.png Close
Ctrl+Shift+F4
Click this button to close the selected tab of the Run tool window and terminate the current process.
/help/img/idea/2017.1/run.png Execute Current Statement
Enter.
Click this button to execute the command at caret, entered in the input pane of the console.
help Help
F1
Use this icon or shortcut to open the corresponding help page.
show-watches Show variablesClick this button to show in a separate pane the variables declared in the console. Right-click on a variable in this pane reveals a context menu.
/help/img/idea/2017.1/consoleHistory.png Browse History
Ctrl+Alt+E
Use this icon or shortcut to open a dialog that shows all the statements that you have run for the corresponding data source.

See also, Executing auto-memorized statements.

Console Toolbar

ItemTooltip and shortcutDescription
/help/img/idea/2017.1/arrowUp.png /help/img/idea/2017.1/arrowDown.png Up/down the Stack Trace
Ctrl+Alt+Up Ctrl+Alt+Down
Click this button to navigate up or down in the stack trace and have the cursor jump to the corresponding location in the source code.
/help/img/idea/2017.1/icon_softWrap.png Use Soft WrapsClick this button to toggle the soft wrap mode of the output.
scrollToEnd.png Scroll to the endClick this button to navigate to the bottom of the stack trace and have the cursor jump to the corresponding location in the source code.
/help/img/idea/2017.1/print.png PrintClick this button to send the console text to the default printer.
/help/img/idea/2017.1/clear_all.png Clear AllClick this button to remove all text from the console. This function is also available on the context menu of the console.
/help/img/idea/2017.1/icon_showCommandLine.pngShow Ruby promptIf this button is pressed, you can enter commands in the console and view output.
Note that in the debug console, code completion is available:
/help/img/idea/2017.1/ruby_interactive_debug_console.png

It's also possible to scroll through the history of commands with the up and down arrow keys.

This button is not available while debugging tests. Refer to the section Debug Tool Window. Interactive Console for details.

/help/img/idea/2017.1/consoleHistory.pngBrowse history
Ctrl+Alt+E
Press this button to show the Debug Console History dialog box, where one can view the console entries and navigate through them, using the arrow keys.

Click OK to close the dialog box.

Context menu commands

CommandShortcutDescription
Compare with ClipboardShow selection in the console and contents of the Clipboard in the Differences viewer.
/help/img/idea/2017.1/gist.pngCreate GistChoose this command to create a Git Gist.
/help/img/idea/2017.1/clear_all.pngClear AllChoose this item on the context menu to delete all messages from the upper part of the console.
PasteCtrl+VInsert the last entry of the Clipboard next to the caret position in the lower part of the console.
Paste from HistoryCtrl+Shift+VInsert selected entry of the Clipboard next to the caret position in the lower part of the console.
Paste SimpleCtrl+Shift+VInsert selected entry of the Clipboard as plain text, next to the caret position in the lower part of the console.

See Also

Last modified: 18 July 2017