在Windows 7上安装vagrant时出现Ruby目录错误

时间:2014-12-01 06:55:53

标签: ruby windows vagrant virtualbox

我在Windows 7上安装了virtualbox和vagrant,我想设置vagrant实例进行开发,但是在安装插件时出现了这个错误。这是我关注的教程。 edx-devstack

C:\HashiCorp\Vagrant\devstack
λ vagrant plugin install vagrant-vbguest
The directory where plugins are installed (the Vagrant home directory)
has a space in it. On Windows, there is a bug in Ruby when compiling
plugins into directories with spaces. Please move your Vagrant home
directory to a path without spaces and try again.

路径变量

λ echo %PATH%
C:\Users\Muhammad Irfan\Downloads\Compressed\cmder\bin;C:\Users\Muhammad Irfan\Downloads\Compressed\cmder\vendor\msysgit\bin;C:\Users\Muhammad Irfan\Downloads\Compressed\cmder\vendor\msysgit\mingw\bin;C:\Users\Muhammad Irfan\Downloads\Compressed\cmder\vendor\msysgit\cmd;C:\Users\Muhammad Irfan\Downloads\Compressed\cmder\vendor\msysgit\share\vim\vim74;C:\Users\Muhammad Irfan\Downloads\Compressed\cmder;C:\Users\Muhammad Irfan\Downloads\Compressed\cmder\vendor\conemu-maximus5\ConEmu;C:\Users\Muhammad Irfan\Downloads\Compressed\cmder\vendor\conemu-maximus5;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Bitvise SSH Client;C:\HashiCorp\Vagrant\bin;C:\Ruby193\bin;C:\Program Files (x86)\Google\google_appengine\

Ruby版本:

λ ruby -v
ruby 1.9.3p551 (2014-11-13) [i386-mingw32]

1 个答案:

答案 0 :(得分:0)

您的用户名包含空格C:\Users\Muhammad Irfan,因此路径包含空格。如错误消息中明确提到的那样是不允许的。修复问题并解决问题。

供参考:Unable to install plugin hostmanager in vagrant in windows 8.1