Run the following to get the ruby bin path
rbenv which ruby
You should get a path like the following.
. Now on RubyMine type Alt + Ctl + S to open settings and search for ‘sdk’. Under Languages & Frameworks you will find Ruby SDK and GEM; select it. Now click on the + icon and select ‘New Remote’. Now Select WSL, choose the linux environment and paste the link we copied earlier. Now your SDK should be added to RubyMine.