How to fix the «Could not find gems binaries directory» IntelliJ IDEA / RubyMine issue with rbenv?

I have found the real solution!

I have found it in the official documentation:

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.

jetbrains.com/help/idea/rbenv-support.html#d447250e198

rbenv: when configuring a remote interpreter, you have to specify ruby executable located under the directory versions, rather than shims.

jetbrains.com/help/idea/configuring-remote-ruby-interpreter.html#d87700e71