bills-kitchen
bills-kitchen copied to clipboard
[Experimental] put the vagrant bin dir to the front of the PATH
Why?
- I just ran
bundle installin vagrant-berkshelf, which cause vagrant to be bundle-installed from a git source. - This caused
W:\home\.chefdk\gem\ruby\2.0.0\bin\vagrant.batto be added / created and this was now in front of the PATH - And I got this error then:
C:\Repos\_github\dev-box>vagrant up
W:/tools/chefdk/embedded/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'vagrant' (>= 0) among 308 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=W:/home/.chefdk/gem/ruby/2.0.0;W:/tools/chefdk/embedded/lib/ruby/gems/2.0.0', execute `gem env` for more information
from W:/tools/chefdk/embedded/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:324:in `to_spec'
from W:/tools/chefdk/embedded/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:58:in `gem'
from W:/home/.chefdk/gem/ruby/2.0.0/bin/vagrant:22:in `<main>'
Thoughts:
- putting the vagrant bin dir in front of the PATH surely helps
- not sure though how well this plays with vagrant-wrapper?
- or should we have vagrant-wrapper pre-installed as gem to prevent this?
Note:
- having vagrant-wrapper preinstalled as a gem does not help --> same problem after running
bundle installnear a Gemfile which references vagrant from a git location - tried setting
BUNDLE_BIN_PATHandBUNDLE_SYSTEM_BINDIRto a directory not on the path but it did not have any effect (in fact no gems ended up there)