Configuring Ruby interpreter
RubyMine enables you to choose the required Ruby interpreter for a current project or newly created projects. The IDE automatically detects interpreters installed on a local machine and maintained by version managers. Moreover, you can add additional local or remote interpreters (Docker, Vagrant, SSH, and so on).
The following interpreters are supported:
Ruby MRI (version 1.8.7 and later)
Rubinius (without debugging)
TruffleRuby (without debugging)
Select Ruby interpreter
To configure Ruby SDK for the current project, follow these steps:
Invoke the Settings/Preferences dialog (Ctrl+Alt+S) and go to the Ruby SDK and Gems page.
(Optional) If RubyMine has multiple projects opened, select the required one to define a Ruby interpreter.
Choose the required Ruby interpreter. You can also choose the gemset for the RVM and rbenv version managers.
For the selected Ruby interpreter/gemset, you can see the installed gems on the right. Learn more about Ruby gems support at Ruby gems support.
If you use RVM or rbenv to manage local Ruby SDKs, you can quickly set the required interpreter in the following way:
Press Ctrl twice.
In the invoked popup, start typing
rbenv shell, select the required interpreter and press Enter.
(Optional) If necessary, click the Rollback button in the popup that informs about the changed SDK.
Add local Ruby interpreter
RubyMine automatically detects local interpreters installed using version managers. To add the required local interpreter manually, perform the following steps:
In the Ruby SDK and Gems page, click the button and select New local…:
Provide a path to the Ruby executable (for example, /usr/local/bin/ruby for Ruby installed to macOS using Homebrew). RubyMine will display the selected interpreter along with automatically detected interpreters.
To remove the interpreter from the list, select it and click the button.
Add remote Ruby interpreter
To configure a remote Ruby interpreter, follow these steps: