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

The same issue:

I have fixed this issue by downgrading my IntelliJ IDEA from 2017.3.2 to 2016.03.7:

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