Vagrant up returns 错误

Vagrant up returns error

操作系统

Windows 10 家 64 位

版本

流浪汉 2.1.2

VirtualBox 5.2.18 r124319

问题

我正在尝试在 Windows 10 工作站上设置 Vagrant 环境,以便可以在 Rails 项目上开发现有的 Ruby。 Git、Vagrant 和 VirtualBox 安装没有问题。项目已克隆到工作目录,Vagrantfile 已被项目负责人包含在项目中。

我打开 Powershell 并导航到工作目录。我运行vagrant up。 Vagrant 似乎四次尝试安装 vagrant-vbguest 插件并抛出错误。

C:/HashiCorp/Vagrant/embedded/gems/2.1.2/gems/vagrant-2.1.2/bin/vagrant:47:in `[]=': Invalid argument - ruby_setenv(VAGRANT_NO_PLUGINS) (Errno::EINVAL)
from C:/HashiCorp/Vagrant/embedded/gems/2.1.2/gems/vagrant-2.1.2/bin/vagrant:47:in `block in <main>'
from C:/HashiCorp/Vagrant/embedded/gems/2.1.2/gems/vagrant-2.1.2/bin/vagrant:36:in `each_index'
from C:/HashiCorp/Vagrant/embedded/gems/2.1.2/gems/vagrant-2.1.2/bin/vagrant:36:in `<main>'

Vagrantfile https://gist.github.com/Tanoro/05cae2eba90cffcb6c12e923012f812a

截图 https://imgur.com/a/ZXg1Ale

调试输出 https://gist.github.com/Tanoro/e0b97ff114ee80faad5a8b65f6edadd7

已尝试修复

  1. https://github.com/hashicorp/vagrant/pull/8127
  2. https://github.com/hashicorp/vagrant/issues/9577#issuecomment-408621009

我在 Github 上收到了关于这个问题的回复。 https://github.com/hashicorp/vagrant/issues/10134

我打开了 bin/vagrant 文件并按照此处的说明在第 47 行标记了 vagrantfile_name 选项。 https://github.com/hashicorp/vagrant/pull/10030/commits/9321f3cb6cbac452e0b7c3a9d1f9731446c60f75

我在我的项目目录之外导航并手动安装了我需要的插件:vagrant-vbguest。它成功安装了。我导航回我的项目目录并再次尝试 vagrant up,成功了。

我听说此行为将在 Vagrant 的下一个版本中得到修复。