Search code examples
pathbundlervirtualboxrubymine

RubyMine Path Mapping for remote Bundler


I am running a Windows 8 workstation with a Virtual Box Ubuntu 12 VM with ruby/rails etc (not RVM, as it isn't supported by RubyMine). RubyMine can connect to the SDK fine and downloads all the gems correctly in the bundle manager screen. It also can run the rails server either locally or on the VM just fine.

Here is the error message I get when running Tools>Bundler>Install:

/usr/bin/ruby /home/username/.rubymine_helpers/rb/exec_with_work_dir.rb C:/Users/username/Documents/projectpath/usr/bin/ruby -e '$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle install /home/username/.rubymine_helpers/rb/exec_with_work_dir.rb:6:in chdir': No such file or directory - C:/Users/username/Documents/projectpath(Errno::ENOENT) from /home/username/.rubymine_helpers/rb/exec_with_work_dir.rb:6:in'

Process finished with exit code 1

As you can see I need to remap the windows path to the corresponding linux path, which exists in a mounted share folder. This has been resolved for Rails, Ruby, Gem, etc by using the Path Mappings option, which looks like the following in workspace.xml:

  <PathMappingSettings>
    <option name="pathMappings">
      <list>
        <mapping local-root="$USER_HOME$/" remote-root="/media/windows-share/" />
      </list>
    </option>
  </PathMappingSettings>

Which looks like C:/Users/username/=/media/windows-share/ in RubyMine's configuration window.

However I can't find the equivalent for bundler. I have added the above path mappings everywhere I can think of within RubyMine. Any ideas?

ps: I can always run commands from my VM to use bundler but I'm so close to getting everything integrated completely with the IDE.


Solution

  • It looks like a known RubyMine bug.