我的Vagrantfile中有错误:
C:\Users\myuser\repos\centos-ansible-box>vagrant up
Installing plugins: vagrant-proxyconf
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: C:/Users/myuser/repos/centos-ansible-box/Vagrantfile
Line number: /Users/myuser/repos/centos-ansible-box/Vagrantfile
Message: TypeError: no implicit conversion from nil to integer
我的电话号码出了什么问题?如果没有这个,那就很难猜出错误。
我猜这并不会发生在所有用户身上,因为我找不到错误报告,而且我没有发现其他任何人抱怨,所以我很困惑。< / p>
示例Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
foo
输出:
C:\Users\myuser\repos\test>vagrant up
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: C:/Users/myuser/repos/test/Vagrantfile
Line number: /Users/myuser/repos/test/Vagrantfile
Message: NameError: undefined local variable or method `foo' for main:Object
使用Vagrant版本1.7.4。
编辑:在Mac OS X上使用相同版本1.7.4,错误信息应该是:
$ vagrant up
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: /Users/myuser/repos/vagrant-test/Vagrantfile
Line number: 4
Message: NameError: undefined local variable or method `foo' for main:Object
所以它似乎只是Windows问题。
编辑2:我现在开了一个关于它的bug report,因为我无法解释任何其他解释。