Remote SDK + RVM + Bundler confuses RubyMine

Hi there,

I have a bit of a complicated setup so I understand this is a tricky one.

I'm coding on Windows with RubyMine (Version 2018.2 Build #RM-182.3684.86) but using a Remote SLES-based VM for actual execution.

My environment uses RVM to manage Ruby versions and bundler to manage gems (I don't use RVMs gemset functionality)


First problem:

I try to run "bundle install" through the RubyMine dropdown (Tools -> Bundler -> Install) and RubyMine throws this error:

bash -c "/home/<redacted>/.rvm/bin/rvm ree-1.8.7-2012.02 do /home/<redacted>/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby install"
/home/<redacted>/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby: No such file or directory -- install (LoadError)

Process finished with exit code 1


RubyMine is trying to run "ruby install" but shouldn't it be trying to run "bundle install"?  If I manually change the command and run it in my terminal it works:

> bash -c "/home/<redacted>/.rvm/bin/rvm ree-1.8.7-2012.02 do /home/<redacted>/.rvm/rubies/ree-1.8.7-2012.02/bin/bundle install"
Fetching gem metadata from https://<redacted>/gems/...
RubyGems 1.8.30 is not threadsafe, so your gems will be installed one at a time. Upgrade to RubyGems 2.1.0 or higher to enable parallel gem installation.
Fetching rake 10.5.0
Installing rake 10.5.0
Fetching Ascii85 1.0.3
Installing Ascii85 1.0.3



Second Problem:

RubyMine does not recognize the gems installed by bundler

Error running 'g2:spec': Unable to find Rake executable script in SDK 'Remote-rvm: ruby-1.8.7 ( MBARI 8/0x6770 on)-p374'


I have bundler set up so it doesn't install gems to the default path, which might be confusing RubyMine.  Here is my "bundle config" output:

Settings are listed in order of priority. The top value will be used.
Set for the current user (/home/<redacted>/.bundle/config): "/home/<redacted>/shared/bundle"

Set for your local app (/home/<redacted>/platform/.bundle/config): "bin"
Set for the current user (/home/<redacted>/.bundle/config): "/home/<redacted>/shared/bin"

Set for the current user (/home/<redacted>/.bundle/config): true


Please sign in to leave a comment.