gpt4 book ai didi

vagrant - 家园.rb :63:in `configure' : undefined method `each' for nil:NilClass (NoMethodError)

转载 作者:行者123 更新时间:2023-12-02 19:33:05 24 4
gpt4 key购买 nike

我遵循了如何安装 Laravel,但毕竟当我输入“vagrant up”时,我收到了这些错误:

C:/Users/Renz/code/Homestead/scripts/homestead.rb:63:in `configure':
undefined m ethod `each' for nil:NilClass (NoMethodError)
from 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/config/v2/loader.rb:37:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/config/v2/loader.rb:37:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/config/loader.rb:103:in `block (2 levels) in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/config/loader.rb:97:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/config/loader.rb:97:in `block in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/config/loader.rb:94:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/config/loader.rb:94:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/vagrantfile.rb:28:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:614:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:614:in `vagrantfile'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:399:in `host'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:198:in `block in action_runner'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:33:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:33:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:386:in `hook'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:596:in `unload'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/bin/vagrant:177:in `ensure in <main>'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/bin/vagrant:177:in `<main>'

我尝试重新安装多次,但仍然遇到相同的错误。

请帮忙,我现在真的需要解决这个问题。非常感谢,谢谢。

最佳答案

您需要将数据库添加到 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

关于vagrant - 家园.rb :63:in `configure' : undefined method `each' for nil:NilClass (NoMethodError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26943977/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com