Skip to content

Conversation

@tknerr
Copy link
Owner

@tknerr tknerr commented Feb 2, 2015

Why?

  • I just ran bundle install in 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.bat to 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?

@tknerr tknerr changed the title put the vagrant bin dir to the front of the PATH [WIP] put the vagrant bin dir to the front of the PATH Feb 2, 2015
@tknerr
Copy link
Owner Author

tknerr commented Feb 8, 2015

Note:

  • having vagrant-wrapper preinstalled as a gem does not help --> same problem after running bundle install near a Gemfile which references vagrant from a git location
  • tried setting BUNDLE_BIN_PATH and BUNDLE_SYSTEM_BINDIR to a directory not on the path but it did not have any effect (in fact no gems ended up there)

@tknerr tknerr changed the title [WIP] put the vagrant bin dir to the front of the PATH [Experimental] put the vagrant bin dir to the front of the PATH Aug 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants