Homestead.rb: 63: in `configure ': undefined method` each' for nil: NilClass (NoMethodError)

I watched how to install Laravel, but in the end, when I entered "stroller up", I get the following errors:

C: /Users/Renz/code/Homestead/scripts/homestead.rb: 63: in configure': undefined m ethod each' for nil: NilClass (NoMethodError) by C: / Users / Renz / code / Homestead / Vagrantfile: 9 : in block in <top (requi red)>' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/c onfig/v2/loader.rb:37:in call' from C: /HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/c onfig / v2 / loader.rb: 37: to load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/c onfig/loader.rb:103:in block (2 levels) in the download 'from C: /HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/ lib / vagrant / c onfig / loader.rb: 97: in each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/c onfig/loader.rb:97:in block in load 'from C: /HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/c onfig / loader.rb: 94: in each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/c onfig/loader.rb:94:in each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/c onfig/loader.rb:94:in load 'from C: /HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/v agrantfile.rb: 28: in initialize' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/e nvironment.rb:614:in new 'from C: /HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6. 5 / lib / vagrant / e nvironment.rb: 614: in vagrantfile' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/e nvironment.rb:399:in host' from C: /HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/e nvironment.rb: 198: in block in action_runner' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/a ction/runner.rb:33:in call 'by C: /HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/a ction / runner .rb: 33: in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/e nvironment.rb:386:in hook' from C: / HashiCorp / Vagrant / embedded / gems / gems / vagrant-1.6.5 / lib / vagrant / e nvironment. rb: 596: in unload' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/bin/vagrant:1 77:in provide in' from C: / HashiCorp / Vagrant / embedded / gems / gems / vagrant-1.6.5 / bin / vagrant: 1 77: in ``

I tried reinstalling it several times, but still getting the same error.

Please help, I really need to fix this now. Appreciate it, thanks.

+6
source share
3 answers

You need to add the database to your Homestead.yaml:

 --- ip: "192.168.10.10" memory: 2048 cpus: 1 authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: ~/Code/testprogram to: /home/vagrant/testprogram sites: - map: test.app to: /home/vagrant/test/public databases: - name: testprogram variables: - key: APP_ENV value: local 
+17
source

I am not very familiar with how the initialization of the Homestead environment works in Windows, but such an error occurs when you try to start the vagrant machine without initializing the environment earlier.

Just make sure you type:

 init.bat 

Hello!

0
source

This happens when your Homestead.yamel file looks like this

 --- ip: "192.168.10.10" memory: 2048 cpus: 1 authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: ~/Code/testprogram to: /home/vagrant/testprogram sites: - map: test.app to: /home/vagrant/test/public ports: < This line should be comment too<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< # - send: 80 # to: 80 

if you comment on this line or delete it, it should work fine

0
source

Source: https://habr.com/ru/post/978233/


All Articles