Bonsoir à tous,

Désolé d'avoir mis ce sujet dans PHP mais je ne trouvais pas vraiment où le placer...

Excusez moi de vous déranger, j'ai récemment formater mon PC pour pouvoir bosser tranquillement sur la formation CakePHP durant les vacances. Ainsi, j'ai voulu m'installer un environnement de travail idéal, je me suis donc inspiré du tuto de grafikart à propos de Vagrant.

J'ai suivi toutes les marches à suivre pour installer la VM Lamp-Stack, or je bute sur une erreur, j'ai regardé certain forum anglais et je n'ai pas trouvé la solution.

  1. Installation de Vagrant : v1.6.3
  2. Installation de Virtual Box : v4.2.24
  3. Git clone : /Documents/Vagrant-Box/LAMP
  4. Modifications du fichier vagrantfile
  5. Installation des plugins :
    --> vagrant plugin install vagrant-omnibus
    --> vagrant plugin install vagrant-hostmanager
    --> vagrant plugin install vagrant-berkshelf

et voici l'erreur

C:\Users\Yann\Documents\Vagrant-Box\lamp>vagrant up
Bringing machine 'blog' up with 'virtualbox' provider...
C:/Users/Yann/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant
/env.rb:18:in `initialize': undefined method `scope' for #<Vagrant::UI::Colored:
0x4609dd0> (NoMethodError)
        from C:/Users/Yann/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berk
shelf/vagrant/action.rb:54:in `new'
        from C:/Users/Yann/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berk
shelf/vagrant/action.rb:54:in `block in setup'
        from C:/Users/Yann/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berk
shelf/vagrant/action.rb:53:in `tap'
        from C:/Users/Yann/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berk
shelf/vagrant/action.rb:53:in `setup'
        from C:/Users/Yann/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berk
shelf/vagrant/plugin.rb:15:in `provision'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/a
ction/runner.rb:42:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/a
ction/runner.rb:42:in `block (2 levels) in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/a
ction/runner.rb:41:in `tap'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/a
ction/runner.rb:41:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/a
ction/runner.rb:40:in `map'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/a
ction/runner.rb:40:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/m
achine.rb:196:in `action_raw'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/m
achine.rb:173:in `block in action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/e
nvironment.rb:434:in `lock'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/m
achine.rb:161:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/m
achine.rb:161:in `action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/b
atch_action.rb:82:in `block (2 levels) in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/d
iagnostic_context.rb:323:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/d
iagnostic_context.rb:323:in `block in create_with_logging_context'

Merci beaucoup de votre aide, parce que là j'ai essayer toute la soirée & je sèche.

4 réponses


Abderrahim-hafidi
Réponse acceptée

J'avais le même problème avec le Tutos de vagrant,et j'ai réussir a configurer une machine virtuelle en installant le serveur apache et phpmyadmin d'une manière manuelle en fusant des apt-get,je te conseille de suivre ce tuto

http://www.youtube.com/watch?v=ZGUEjZckijA

aprés tu accedde a la machine en fusant ssh et tu installe phpmyadmin grâce a la commande :

sudo apt-get install phpmyadmin

Bonsoir,

$_ > vagrant init hashicorp/precise32
$_ > vagrant up
GameTag
Auteur

Hello

Merci de votre réponse mais votre code n'a pas résolu mon problème puisqu'il initialise une nouvelle machine precise32 par défaut. Or, je voulais créer la VM Lamp-Stack de MiniCodeMonkey : https://github.com/MiniCodeMonkey/Vagrant-LAMP-Stack

Et j'ai toujours la même erreur Berkshelf. Ceci dit je vais essayer de faire mon propre VagrantFile pour installer Apache et apt sur la machine par défaut.

A ce propos j'ai une question : est-ce que l'utilisation de Chef solo a besoin de Berkshelf ?

Merci d'avance

Oui je pense ses le mieux =)