Ruby version managers
The most popular way to install Ruby on Linux or macOS is using a version manager, for example, RVM or rbenv. Version managers allow you to install several Ruby versions on your machine and quickly switch between them. IntelliJ IDEA automatically detects interpreters installed on a local machine and maintained by the following version managers:
Auto-switch a Ruby interpreter/gemset
Version managers support various types of configuration files used to auto-switch a project's Ruby version and gemset. For example, you can set the Ruby interpreter version to 2.6.3 and the gemset to sample_rails_app in one of the following ways:
Using the .ruby-version / .ruby-gemset filesruby-2.6.3sample_rails_app
Using the .versions.conf fileruby=2.6.3 ruby-gemset=sample_rails_app
If the corresponding Ruby version is installed and the gemset exists, IntelliJ IDEA automatically switches the project interpreter and gemset on the project opening.
Remote Ruby interpreters
IntelliJ IDEA allows you to use remote Ruby interpreters maintained using version manages. In this case, you have to specify a path to the version manager executable when configuring a remote interpreter. For instance, the following table lists typical paths for Linux.
|Version manager||Executable path|
Single-user mode: /home/jetbrains/.rvm/bin/rvm (for the jetbrains user)
Multi-user mode: /usr/local/rvm/bin/rvm
Mixed mode: /usr/share/rvm/bin/rvm
/home/jetbrains/.rbenv/bin/rbenv (for the jetbrains user)
/home/jetbrains/.asdf/bin/asdf (for the jetbrains user)
How to: Debug detecting of Ruby interpreters
If you have issues with detecting local Ruby interpreters maintained by your version manager, follow the steps below to help us determine the cause of the problem:
Open IntelliJ IDEA and go to.
In the invoked dialog, specify a logger identifier for your version manager:
Restart IntelliJ IDEA.
Open a log file and make sure it contains entries corresponding to your version manager, for example:2018-07-30 16:57:18,237  DEBUG - management.asdf.AsdfSdkRefresher - Refreshing sdks
Create an issue and attach the logs.