RubyMine 7.0.0 Web Help

Tools | Run IRB Console

Tools | Run Rails Console


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.
Rails console is only available for the Rails applications; IRB is available for both pure Ruby projects, and Rails applications.

Color and font scheme of a console is configurable on the Console Colors and Console Fonts pages of the Colors and Fonts editor settings.

An interactive console is divided into two panes: the lower pane serves for user input, the upper pane displays results and messages.

Item Tooltip and shortcut Description
5.0+ rerunConsole Rerun console
Ctrl+F5Ctrl+F5Ctrl+5Ctrl+F5Ctrl+F5Ctrl+F5Ctrl+F5Ctrl+F11Ctrl+Alt+RCommand RControl F5Command RControl Alt R
Click this button to terminate the current process and launch the new one.
stop Stop
Ctrl+F2Ctrl+F2Ctrl+2Ctrl+F2Ctrl+F2Shift+F5Shift+F5 or Ctrl+Shift+DeleteCtrl+F2Ctrl+Back SlashCommand F2Command F2Command F2Command F2
Click this button to stop the current process.
close.png Close
Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+WShift+Meta+WControl Shift F4Shift Command F4Command WShift Command W
Click this button to close the selected tab of the Run tool window and terminate the current process.
runBuild Execute Current Statement
EnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnter.
Click this button to execute the command at caret, entered in the input pane of the console.
help.gif Help
F1F1F1F1F1F1F1F1F1ContextHelpF1ContextHelpF1
Use this icon or shortcut to open the corresponding help page.
show-watches Show variables Click 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.
consoleHistory Browse History
Ctrl+Alt+ECtrl+Alt+ECtrl+Alt+ECtrl+Alt+ECtrl+Alt+ECtrl+Alt+ECtrl+Alt+ECtrl+Alt+EAlt+Meta+EAlt Command EAlt Command EAlt Command EAlt Command E
Use this icon or shortcut to open a dialog that shows all the statements that you have run in the console.

See also, Executing auto-memorized statements.

Console toolbar

Item Tooltip and shortcut Description
arrowUp arrowDown Up/down the Stack Trace
Ctrl+Alt+UpCtrl+Alt+UpCtrl+Alt+UpCtrl+Alt+UpCtrl+Alt+UpCtrl+Alt+UpCtrl+Alt+UpCtrl+Alt+UpAlt+Meta+UpAlt Command UpAlt Command UpAlt Command UpAlt Command Up Ctrl+Alt+DownCtrl+Alt+DownCtrl+Alt+DownCtrl+Alt+DownCtrl+Alt+DownCtrl+Alt+DownCtrl+Alt+DownCtrl+Alt+DownAlt+Meta+DownAlt Command DownAlt Command DownAlt Command DownAlt Command 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.
icon_softWrap Use Soft Wraps Click this button to toggle the soft wrap mode of the output.
scrollToEnd.png Scroll to the end Click this button to navigate to the bottom of the stack trace and have the cursor jump to the corresponding location in the source code.
print Print Click this button to send the console text to the default printer.
clear_all Clear All Click this button to remove all text from the console. This function is also available on the context menu of the console.
icon_showCommandLine Show Ruby prompt If this button is pressed, you can enter commands in the console and view output.
Note that in the debug console, code completion is available:

ruby_interactive_debug_console

It's also possible to scroll through the history of commands.

Context menu commands

Command Shortcut Description
Copy Reference Ctrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CShift+Alt+Meta+CShift Alt Command CShift Alt Command CShift Alt Command CShift Alt Command C Choose this command to put reference to the symbol at caret to the Clipboard.
Compare with Clipboard Show selection in the console and contents of the Clipboard in the Differences viewer.
gistCreate Gist Choose this command to create a Git Gist.
clear_allClear All Choose this item on the context menu to delete all messages from the upper part of the console.
Paste Ctrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertAlt+P, Shift+Insert or Ctrl+YCtrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertMeta+V or Shift+InsertCommand V or Shift InsertCommand V or Shift InsertCommand V or Shift InsertCommand V or Shift Insert Insert the last entry of the Clipboard next to the caret position in the lower part of the console.
Paste from History Ctrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertAlt+YCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertShift+Meta+V or Shift+Meta+InsertShift Command V or Shift Command InsertShift Command V or Shift Command InsertShift Command V or Shift Command InsertShift Command V or Shift Command Insert Insert selected entry of the Clipboard next to the caret position in the lower part of the console.
Paste Simple Ctrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertAlt+YCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertShift+Meta+V or Shift+Meta+InsertShift Command V or Shift Command InsertShift Command V or Shift Command InsertShift Command V or Shift Command InsertShift Command V or Shift Command Insert Insert selected entry of the Clipboard as plain text, next to the caret position in the lower part of the console.

Tip

Use up and down arrow keys to browse through the history of executed commands, and repeat the desired ones.

See Also

Procedures:

Getting Started:

Web Resources: