Bonjour, bonsoir

Suite au tutoriel sur vagrant, J'ais crée une machine qui tourne surre le git-up de MiniCodeMonkey "https://github.com/MiniCodeMonkey/Vagrant-LAMP-Stack". Tout se passe bien jusqu'au démarrage de la machine une erreur s'affiche.

vagrant up
Bringing machine 'dev' up with 'virtualbox' provider...
C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/env.rb:18:in `initialize': un
defined method `scope' for #<Vagrant::UI::Colored:0x48bd840> (NoMethodError)
        from C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:54:in
`new'
        from C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:54:in
`block in setup'
        from C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:53:in
`tap'
        from C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:53:in
`setup'
        from C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/plugin.rb:15:in
`provision'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:42:in `call'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:42:in `block (2
 levels) in run'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:41:in `tap'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:41:in `block in
 run'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:40:in `map'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:40:in `run'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:196:in `action_raw'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:173:in `block in acti
on'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:434:in `lock'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:161:in `call'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:161:in `action'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/batch_action.rb:82:in `block (2
levels) in run'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `ca
ll'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `bl
ock in create_with_logging_context'

j'ais effectuer dans l'ordre, ces actions:

commande:
git clone https://github.com/MiniCodeMonkey/Vagrant-LAMP-Stack.git

modification du fichier "Vagrantfile"

ligne 12 = project_name = "dev"
ligne 35 = config.vm.synced_folder "\vagrant\lamp\Vagrant-LAMP-Stack\vagrant" , "/var/www/" + project_name + "/", :mount_options => "dmode=777", "fmode=666"]
ligne 69 = :docroot => "/var/www/" + project_name,

fichier de basse :

# -*- mode: ruby -*-
# vi: set ft=ruby :
# General project settings
#################################
  # IP Address for the host only network, change it to anything you like
  # but please keep it within the IPv4 private network range
  ip_address = "172.22.22.22"
  # The project name is base for directories, hostname and alike
  project_name = "dev"
  # MySQL and PostgreSQL password - feel free to change it to something
  # more secure (Note: Changing this will require you to update the index.php example file)
  database_password = "root"

# Vagrant configuration
#################################
  Vagrant.configure("2") do |config|
    # Enable Berkshelf support
    config.berkshelf.enabled = true
    # Use the omnibus installer for the latest Chef installation
    config.omnibus.chef_version = :latest
    # Define VM box to use
    config.vm.box = "precise32"
    config.vm.box_url = "http://files.vagrantup.com/precise32.box"
    # Set share folder
    config.vm.synced_folder "\vagrant\lamp\Vagrant-LAMP-Stack\vagrant" , "/var/www/" + project_name + "/", :mount_options => "dmode=777", "fmode=666"]
    # Use hostonly network with a static IP Address and enable
    # hostmanager so we can have a custom domain for the server
    # by modifying the host machines hosts file
    config.hostmanager.enabled = true
    config.hostmanager.manage_host = true
    config.vm.define project_name do |node|
      node.vm.hostname = project_name + ".local"
      node.vm.network :private_network, ip: ip_address
      node.hostmanager.aliases = "www." + project_name + ".local" ]
    end
    config.vm.provision :hostmanager
    # Enable and configure chef solo
    config.vm.provision :chef_solo do |chef|
      chef.add_recipe "app::packages"
      chef.add_recipe "app::web_server"
      chef.add_recipe "app::vhost"
      chef.add_recipe "memcached"
      chef.add_recipe "app::db"
      chef.json = {
        :app => {
          # Project name
          :name => project_name,
          # Name of MySQL database that should be created
          :db_name => "dbname",
          # Server name and alias(es) for Apache vhost
          :server_name => project_name + ".local",
          :server_aliases => "www." + project_name + ".local" ],
          # Document root for Apache vhost
          :docroot => "/var/www/" + project_name,
          # General packages
          :packages => %w{ vim git screen curl },

          # PHP packages
          :php_packages => %w{ php5-mysqlnd php5-curl php5-mcrypt php5-memcached php5-gd }
        },
        :mysql => {
          :server_root_password => database_password,
          :server_repl_password => database_password,
          :server_debian_password => database_password,
          :bind_address => ip_address,
          :allow_remote_root => true
        }
      }
    end
  end

commande:
vagrant up

En espérant que vous pourriez m'aider, merci d'avance de votre aide

7 réponses


Bonjour, - Télécharger les versions suivante de Ruby (2.0 & 1.9.3) içi : [url=http://rubyinstaller.org/downloads/]RubyInstaller Downloads[/url] - Éditez [code]C:\HashiCorp\Vagrant\embedded\config.yml[/code] dans le fichier changez [code]C:\vagrant-substrate\staging\embedded[/code] par [code]C:\HashiCorp\Vagrant\embedded[/code] - Ouvrez CMD - Désinstallez la version binaire de gem avec la commande [code]C:\HashiCorp\Vagrant\embedded\bin\gem uninstall json[/code] - Démarrez "devkitvars.bat" en tant qu'administrateur pour des raisons de compatibilités. - Installez la version native Ruby de gem avec la commande [code]C:\HashiCorp\Vagrant\embedded\bin\gem install json --platform=ruby[/code] - Installez de nouveau tous les plugins qu'il vous faut. Cordialement, Kaotic.

bonjour , bonsoir

Un grand merci a toi, j'ais bien suivie les étapes que tu ma donner mais rien n'y vais.

Par contre dans le message d’erreur une valeur a changer " Colored:0x48bd840 ==> Colored:0x6cf95d0 "

C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/env.rb:18:in `initialize': undefined method `scope' for #<Vagrant::UI::Colored:0x6cf95d0> (NoMethodError)

Code complet :

Bringing machine 'projectname' up with 'virtualbox' provider...
C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/env.rb:18:in `initialize': undefined method `scope' for #<Vagrant::UI::Colored:0x6cf95d0> (NoMethodError)
        from C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:54:in `new'
        from C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:54:in `block in setup'
        from C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:53:in `tap'
        from C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:53:in `setup'
        from C:/Users/admin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/plugin.rb:15:in `provision'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/action/runner.rb:42:in `call'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/action/runner.rb:42:in `block (2 levels) in run'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/action/runner.rb:41:in `tap'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/action/runner.rb:41:in `block in run'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/action/runner.rb:40:in `map'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/action/runner.rb:40:in `run'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/machine.rb:190:in `action_raw'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/machine.rb:167:in `block in action'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/environment.rb:426:in `lock'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/machine.rb:155:in `action'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.1/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
        from F:/HashiCorp/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'

2 èm précision : vagrant et installer sur un ssd avec la lettre de lecture F

Salut,

Mes étapes ont marcher sur mon second PC, mais pas sur mon PC principal.

J'ai aussi personnellement installer Vagrant sur mon second disque dur, je vais essayer sur mon SSD.

Sinon si vous avez d'autre astuce pour régler les problèmes nous sommes preneur. :)

Cordialement,
Kaotic.

Bonjour, bonsoir

Je vais essayer moi aussi de mon coter, installer vagrant sur le C.
Je vous donnerez des news.

Cordialement,
Jonasky

Salut,

Pour ce qui est de mes nouvelles, sa n'a absolument rien changer d'installer le tout sur mon disque C.

Cordialement,
Kaotic.

ReSalut,

Je voulais savoir qu'elle OS as-tu? x86 ou x64?

Cordialement,
Kaotic.

windows 8 x64

ma configurations complété : ici