Closed AnthonyMastrean closed 10 years ago
The reason Vagrant does this is beacuse Ruby has a bug where it cannot be installed to folders with spaces. Once this is fixed, we'll move it back to the correct location. Until then, it doesn't work.
So, if the bug is fixed in 2.0... we're on the right track?
@AnthonyMastrean There is another issue as well. But even so, you'll find that the bug is not fixed in 2.0. We had some users who moved the installer to %PROGRAMFILES%
and ran into a bunch of issues less than 6 months ago. :(
There is an easy way to solve this. Windows provides and alternate "short name" for all files and folders that aren't the (old-style) 8dot3 file names. On most installations, C:\Program Files\ will be C:\PROGRA\~1 and C:\Program Files (x86)\ will be C:\PROGRA\~2. This way, Ruby can happily find the folder without needing spaces.
Judging from the Vagrant 1.8.1 msi installer file, this is still the case, has the Ruby problem been resolved so this can be corrected? Or how about pbarney's suggestion above?
I've just had to run some things on Windows, so I've decided to try installing Vagrant in a proper location. I've told 1.8.1 x86_64 .msi to install to C:\Progra~1\Vagrant
, ensuring Progra~1
is 8.3 name for Program Files
- and I don't experience any issues so far.
%PATH%
contains 8.3 name, exactly as was specified when installing.vagrant up
(using Salt provisioner, if that matters)."C:\Program Files\Vagrant\bin\vagrant.exe" plugin install vagrant-address
(to ensure argv[0]
is a LFN) and that had worked just fine (sans the inability to work with Virtualbox - I didn't need the plugin, just wanted to test)I don't know if specifying 8.3 filename at install time had helped, or that Ruby bug is already fixed or I just missed the faulty scenario. If anyone can tell what exactly to look for, ping me and I'll try to check it out.
The ruby bug is supposed to be fixed for a very long time: https://bugs.ruby-lang.org/issues/7036
@mitchellh Are you able to provide an upstream bug report that we can track? The one @apupier mentioned was fixed 4 years ago in 2.0.0dev. If the issue doesn't yet exist, we should file one.
Vagrant on Windows installs to
%SYSTEMDRIVE%\HashiCorp\Vagrant
by default. This is considered the wrong location for a variety of reasons (see some of the comments and links in the original issue). Good Windows installer practice recommends%PROGRAMFILES%\HashiCorp\Vagrant
or
%PROGRAMFILES(X86)%\HashiCorp\Vagrant
(for 32-bit programs on 64-bit systems)