2016-12-06 1 views
0

J'essaye de vagabonder une boîte personnalisée dans ma machine Mac locale. En raison d'un problème avec la version de VirtualBox, j'ai dû formater et réinstaller OSx. J'ai installé Chef DK, Vagrant et installé le plugin berkshelf. Lorsque je tente de Vagrant, je reçois l'erreur suivante:Erreur de vagabondage lors de la tentative de vagabondage

Bringing machine 'default' up with 'virtualbox' provider... 
/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler (LoadError) 
    from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/util/env.rb:1:in `<top (required)>' 
    from /Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.1.1/lib/vagrant-berkshelf/helpers.rb:62:in `berks' 
    from /Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.1.1/lib/vagrant-berkshelf/action/check.rb:33:in `berkshelf_version_check!' 
    from /Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.1.1/lib/vagrant-berkshelf/action/check.rb:16:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builtin/config_validate.rb:25:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builtin/handle_box.rb:56:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builder.rb:116:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `block in run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/util/busy.rb:19:in `busy' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builtin/call.rb:53:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builder.rb:116:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `block in run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/util/busy.rb:19:in `busy' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/machine.rb:225:in `action_raw' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/machine.rb:200:in `block in action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/environment.rb:567:in `lock' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/machine.rb:186:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/machine.rb:186:in `action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run' 
    from /opt/vagrant/embedded/gems/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `call' 

Ma configuration actuelle est:

Vagrant Version 1.9.0 
Chef Development Kit Version: 1.0.3 
chef-client version: 12.16.42 
delivery version: master (83358fb62c0f711c70ad5a81030a6cae4017f103) 
berks version: 5.2.0 
kitchen version: 1.13.2 

vagrant-berkshelf (5.1.1) 
vagrant-omnibus (1.5.0) 
vagrant-share (1.1.6) 

Quand je désactiver berkshelf dans la recette il fonctionne, mais évidemment les dépendances ne fonctionnent pas .

Si je passe le plugin berkshelf à 5.0.0 je reçois une autre erreur:

Bringing machine 'default' up with 'virtualbox' provider... 
/Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.0.0/lib/vagrant-berkshelf/helpers.rb:62:in `berks': uninitialized constant VagrantPlugins::Berkshelf::Helpers::Bundler (NameError) 
    from /Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.0.0/lib/vagrant-berkshelf/action/check.rb:33:in `berkshelf_version_check!' 
    from /Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.0.0/lib/vagrant-berkshelf/action/check.rb:16:in `call' 

J'ai été googler depuis plusieurs jours sans chance, s'il vous plaît aider.

+0

Essayez 'plugin vagrant install bundler'? – coderanger

+0

Merci, mais maintenant il donne une erreur différente: 'Vagrant n'a pas pu s'initialiser à un stade très précoce: Les plugins n'ont pas pu se charger correctement. Le message d'erreur indiqué est illustré ci-dessous. Impossible de trouver Gemfile ou .bundle/directory' –

+0

Vous devez probablement le supprimer du manifeste du plugin, vous voulez laisser le gem installé mais ne pas essayer de le charger en tant que plugin. – coderanger

Répondre

1

Après plusieurs jours de recherches avec un collègue, nous avons comparé nos versions et réduit le problème à la version Vagrant. Je courais 1.9.0 et il courait 1.8.4. Comme la même recette a fonctionné sur sa machine, j'ai dégradé Vagrant à sa version et voila, ça a marché. Nous ne savons toujours pas quelle est la différence exacte et pourquoi ce problème se produit, mais cela fera pour l'instant. J'espère que cela aidera ceux qui trébuchent dans ce problème.

0

Vous devez mettre à jour ou installer votre plugin vagabondage. Exécutez cette commande:

vagrant plugin install vagrant-share --plugin-version 1.1.8 

Adapter la version basée sur une nouvelle ou souhaité.

Si cela ne fonctionne pas pour vous (a travaillé pour moi), il ya un problème sur GitHub à ce sujet here.