我让我的Vagrant盒子在我的Mac上与小牛队一起运作良好。我在homestead.yaml文件中添加了一个新项目,当我运行vagrant reload时,我收到了以下内容:
Bringing machine 'default' up with 'virtualbox' provider...
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/kernel_v2/config/vm.rb:550:in `initialize': no implicit conversion of nil into String (TypeError)
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/kernel_v2/config/vm.rb:550:in `new'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/kernel_v2/config/vm.rb:550:in `block in validate'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/kernel_v2/config/vm.rb:545:in `each'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/kernel_v2/config/vm.rb:545:in `validate'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/v2/root.rb:68:in `block in validate'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/v2/root.rb:64:in `each'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/v2/root.rb:64:in `validate'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/config_validate.rb:15:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/call.rb:53:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:196:in `action_raw'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:173:in `block in action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:in `lock'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
我没有触及任何其他东西。现在我无法启动它。有什么想法吗?
答案 0 :(得分:2)
在这个封闭的问题上,这家伙遇到了同样的错误:
https://github.com/mitchellh/vagrant/issues/3961
看起来他的Vagrant文件中的错误陈述导致它在启动时崩溃。也许在你的yaml文件中有拼写错误或类似的东西?您是否修改了主要的Vagrantfile甚至hometead.rb文件?任何一个错字或错误都可能导致您的问题。
答案 1 :(得分:2)
在这个问题上花了好几个小时之后,我就重新初始化了宅基地。
删除了现有的宅基地文件夹。
rm -rf .homestead
初始化宅基地。
homestead init
编辑yaml文件
家园编辑
它得到了它并且正在运行。