RubyMine 2025.1 Help

Ruby interpreter gemsets

RubyMine provides the ability to work with gemsets for the RVM and rbenv version managers. Note that this functionality is supported only for local interpreters.

To see gemsets available for the installed interpreters, open the Settings dialog Ctrl+Alt+S and go to the Language & Frameworks | Ruby Interpreters page. On this page, the gemsets are shown as the interpreter children:

Ruby Interpreters page for RVM

For RVM, you can select a certain gemset and install project gems to this gemset. On the other hand, the rbenv version manager provides the ability to select several gemsets for a project:

Ruby Interpreters page for rbenv

In this case, gems will be installed to the first enabled gemset. For more information about installing gems, refer to Install gems.

Create RVM gemsets

Create a gemset for an existing project

To create an RVM gemset, open the Settings dialog (Ctrl+Alt+S), go to the Language & Frameworks | Ruby Interpreters page, and perform the following steps:

  1. Right-click the required interpreter and select New RVM gemset

    Ruby Interpreters page
  2. In the dialog that opens, select the Ruby interpreter, for which the gemset will be created. Then, specify the gemset name and click OK:

    create new rvm gemset dialog
  3. The Ruby Interpreters page will show the gemset as a child of the selected interpreter:

    Ruby Interpreters page

    Note that the asterisk is appended to the gemset name. This means that gemset is not created yet. To create it, click Apply or OK in the Settings dialog.

Create Rbenv gemsets

RubyMine enables you to work with rbenv gemsets using the rbenv-gemsets plugin. In this case, the .rbenv-gemsets file manages project gemsets. RubyMine synchronizes the gemsets enabled in the Ruby Interpreters page with the ones specified in .rbenv-gemsets. For instance, if you uncheck the gemset in Ruby Interpreters, the corresponding record will be removed from the .rbenv-gemsets file.

Furthermore, you can create and disable gemsets right in the editor:

  1. Open the project’s .rbenv-gemsets file.

  2. Type the required gemset name on a separate line.

  3. Use the Create ‘name’ quick-fix to create a gemset:

    Create gemset quick fix

    This gemset will be shown as a child of the current interpreter:

    Ruby Interpreters page
  4. If you remove this gemset from the .rbenv-gemsets, click Update libraries:

    update libraries in the editor

    The gemset will be disabled for the current interpreter.

Last modified: 17 February 2025