Rbenv Support
Overview
rbenv
is intended for *NIX and macOS!
RubyMine supports rbenv
versions up to the latest.
At startup, RubyMine scans your ~/.rbenv
folder, and automatically configures SDK's for each Ruby interpreter. The detected interpreters are shown in the Ruby SDK and Gems page of the Settings/Preferences dialog.
RubyMine also detects newly installed rbenv
interpreters "on-the-fly". On reopening the Settings/Preferences dialog, you will find updates in the Ruby SDK and Gems page .
Prerequisites
rbenv
is installed on your computer.- Ruby interpreters are installed.
- RubyMine supports
rbenv
Ruby interpreters installed in the defaultrbenv
folder~/.rbenv
only. rbenv
is incompatible withrvm
! Any references torvm
should be removed before usingrbenv
.
Support for rbenv-gemsets plugin
RubyMine supports rbenv-gemsets plugin for *NIX and macOS.
- The gemsets are shown as the children of
rbenv
SDK. When a gemset is selected, its gems are shown to the right,rbenv
SDK with gemsets is selected, then all the gems of this SDK and the gemsets are shown. - RubyMine provides libraries for gems from the current gemset list ( by '.
rbenv-gemsets
') including the default 'global' gemset - RubyMine invokes all commands with the environment of the specified gemsets and selected SDK ( e.g.
$ RBENV_GEMSETS="gemset1 gemset2" RBENV_VERSION="1.9.3-p125" #command
)
File .rbenv-gemset
RubyMine provides code insight for the .rbenv-gemset
file:
- Code highlighting
- RubyMine provides code completion for the current SDK gemsets in the
.rbenv-gemsets
file. - RubyMine provides the ability to create a new gemset using the quick fix Create gemset <gemset name>. Just press Alt+Enter on a new name in the
.rbenv-gemsets
file:
etc.
Important note about remote interpreters
If you are configuring a remote interpreter using rbenv version manager, you have to specify ruby executable located under the directory versions
, rather than shims
.