hashicorp / vagrant-installers

Project to automatically create Vagrant installers for various platforms.
MIT License
172 stars 69 forks source link

Vagrant installs to the "wrong" directory by default on Windows #46

Closed AnthonyMastrean closed 10 years ago

AnthonyMastrean commented 10 years ago

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

or

mitchellh commented 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.

AnthonyMastrean commented 10 years ago

So, if the bug is fixed in 2.0... we're on the right track?

mitchellh commented 10 years ago

@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. :(

pbarney commented 9 years 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.

AJ-Stevens commented 8 years ago

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?

drdaeman commented 8 years ago

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.

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.

apupier commented 8 years ago

The ruby bug is supposed to be fixed for a very long time: https://bugs.ruby-lang.org/issues/7036

Zenexer commented 7 years ago

@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.