tpope / vim-bundler

bundler.vim: Lightweight support for Ruby's Bundler
https://www.vim.org/scripts/script.php?script_id=4280
403 stars 29 forks source link

absolute path value for BUNDLE_PATH in .bundle/config not supported #45

Closed prognostikos closed 1 year ago

prognostikos commented 6 years ago

It seems like a recent change in bundler keeps overwriting the BUNDLE_PATH value in .bundle/config with an absolute path, instead of a relative path. I'm using Bundler version 1.15.4 and vim-bundler at 97d5077

This .bundle/config works as expected with vim-bundler:

---
BUNDLE_PATH: "vendor"
BUNDLE_DISABLE_SHARED_GEMS: "true"
BUNDLE_WITHOUT: "production"
BUNDLE_CACHE_ALL: "true"

However, every time bundler is run, the file gets overwritten with the full path to the vendor directory:

---
BUNDLE_PATH: "/Users/rohrer/c/bn/mrclean/vendor"
BUNDLE_DISABLE_SHARED_GEMS: "true"
BUNDLE_WITHOUT: "production"
BUNDLE_CACHE_ALL: "true"

After that change, calling e.g. Bvsplit que gives the errorGem "que" is in bundle but not installed.

If I insert a echo gem_paths at line 376 in plugin/bundler.vim I see ['/Users/rohrer/c/bn/mrclean//Users/rohrer/c/bn/mrclean/vendor/ruby/2.4.0']

I guess self.path should handle absolute paths better, though I'm not sure if that's part of the plugin or built in to vimscript.