{"action":"created","issue":{"url":"https://api.github.com/repos/test-kitchen/kitchen-vagrant/issues/190","labels_url":"https://api.github.com/repos/test-kitchen/kitchen-vagrant/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/test-kitchen/kitchen-vagrant/issues/190/comments","events_url":"https://api.github.com/repos/test-kitchen/kitchen-vagrant/issues/190/events","html_url":"https://github.com/test-kitchen/kitchen-vagrant/issues/190","id":102664921,"number":190,"title":"Bundler environment not properly reset?","user":{"login":"tknerr","id":365744,"avatar_url":"https://avatars.githubusercontent.com/u/365744?v=3","gravatar_id":"","url":"https://api.github.com/users/tknerr","html_url":"https://github.com/tknerr","followers_url":"https://api.github.com/users/tknerr/followers","following_url":"https://api.github.com/users/tknerr/following{/other_user}","gists_url":"https://api.github.com/users/tknerr/gists{/gist_id}","starred_url":"https://api.github.com/users/tknerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tknerr/subscriptions","organizations_url":"https://api.github.com/users/tknerr/orgs","repos_url":"https://api.github.com/users/tknerr/repos","events_url":"https://api.github.com/users/tknerr/events{/privacy}","received_events_url":"https://api.github.com/users/tknerr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-23T21:56:52Z","updated_at":"2015-08-23T22:35:42Z","closed_at":null,"body":"Forking off an issue from the related discussion here:\r\nhttps://github.com/mitchellh/vagrant/issues/6158\r\n\r\nSo I have:\r\n\r\n * ChefDK 0.7.0 installed\r\n * Vagrant 1.7.4 installed (via the .msi installer; it's not present as a gem)\r\n * the most recent bundler version installed: `gem install bundler -v 1.10.6`\r\n\r\nNow whenever I `bundle exec kitchen create` I get an error like this:\r\n```\r\nC:\\Repos\\_github\\bills-kitchen\\target\\build\\repo\\vagrant-workflow-tests\\playground\\sample-toplevel-cookbook>bundle exec kitchen create 1204\r\n-----> Starting Kitchen (v1.4.2)\r\n-----> Creating <default-ubuntu-1204>...\r\n       Vagrant experienced a version conflict with some installed plugins!\r\n       This usually happens if you recently upgraded Vagrant. As part of the\r\n       upgrade process, some existing plugins are no longer compatible with\r\n       this version of Vagrant. The recommended way to fix this is to remove\r\n       your existing plugins and reinstall them one-by-one. To remove all\r\n       plugins:\r\n\r\n           rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems\r\n\r\n       Note if you have an alternate VAGRANT_HOME environmental variable\r\n       set, the folders above will be in that directory rather than your\r\n       user's home directory.\r\n\r\n       The error message is shown below:\r\n\r\n       Bundler could not find compatible versions for gem \"bundler\":\r\n         In Gemfile:\r\n           vagrant (= 1.7.4) x86-mingw32 depends on\r\n             bundler (<= 1.10.5, >= 1.5.2) x86-mingw32\r\n\r\n         Current Bundler version:\r\n           bundler (1.10.6)\r\n       This Gemfile requires a different version of Bundler.\r\n       Perhaps you need to update Bundler by running `gem install bundler`?\r\n       Could not find gem 'bundler (<= 1.10.5, >= 1.5.2) x86-mingw32', which is required by gem 'vagrant (= 1.7.4) x86-mingw32', in any of the sources.\r\n```\r\n\r\nThis is weird because Vagrant should never see that it's called from a bundled context, eventually with a bundler version that is not compatible. In fact Vagrant ships with it's own version of bundler (1.10.5 in that case) and should never see the outer bundler.\r\n\r\n@sethvargo [suggests here](https://github.com/mitchellh/vagrant/issues/6158#issuecomment-132290890) that this might have something to do with the bundler environment not being correctly cleaned / restored\r\n"},"comment":{"url":"https://api.github.com/repos/test-kitchen/kitchen-vagrant/issues/comments/133949982","html_url":"https://github.com/test-kitchen/kitchen-vagrant/issues/190#issuecomment-133949982","issue_url":"https://api.github.com/repos/test-kitchen/kitchen-vagrant/issues/190","id":133949982,"user":{"login":"sethvargo","id":408570,"avatar_url":"https://avatars.githubusercontent.com/u/408570?v=3","gravatar_id":"","url":"https://api.github.com/users/sethvargo","html_url":"https://github.com/sethvargo","followers_url":"https://api.github.com/users/sethvargo/followers","following_url":"https://api.github.com/users/sethvargo/following{/other_user}","gists_url":"https://api.github.com/users/sethvargo/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvargo/subscriptions","organizations_url":"https://api.github.com/users/sethvargo/orgs","repos_url":"https://api.github.com/users/sethvargo/repos","events_url":"https://api.github.com/users/sethvargo/events{/privacy}","received_events_url":"https://api.github.com/users/sethvargo/received_events","type":"User","site_admin":false},"created_at":"2015-08-23T22:35:42Z","updated_at":"2015-08-23T22:35:42Z","body":"@tknerr that's my point though - they should not be retaining the context from within a bundle. They should be shelling out using the same environment as if you ran `vagrant` yourself from a terminal.\r\n\r\n`bundle exec` is going to repro because Vagrant isn't designed to be run inside of a bundle."}}