'How to inspect rails gem's source code on RubyMine with rbenv

I'm on Macos Monterey using RubyMine as ide, usually with rvm and ⌘ + Click on a method/class name I could navigate to the original source code of all gems installed. Now I moved to rbenv and this shortcut only works for some gems, the ones I can find under external libraries section of the ide.

Wrong: incomplete behaviour

Correct: correct behaviour

Is there a way to restore the original behaviour and access all gem's code?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source