As a new Vagrant user I followed the instructions here 
<http://docs.vagrantup.com/v2/synced-folders/rsync.html>, installing the 
cygwin rsync package and then adding it to my Windows path. 

I figured it should just work, but upon reload I started getting errors 
like:

rsync: change_dir "/c/workspace" failed: No such file or directory (2)

I tried a bunch of other ways of specifying the path in Vagrantfile such as:

config.vm.synced_folder "../workspace", "/workspace", type: "rsync", 
rsync__auto: "true"
config.vm.synced_folder "C:/workspace", "/workspace", type: "rsync", 
rsync__auto: "true"
config.vm.synced_folder "/cygdrive/c/workspace", "/workspace", type: "rsync"
, rsync__auto: "true"

but all resulted in the same error. There are a lot of results when 
Googling Vagrant rsync problems making it harder to find the right one. 
Finally I found this issue 
<https://github.com/mitchellh/vagrant/issues/4073>, and embedded in the 
many comments spanning more than a year there is the suggestion to add this 
line:

ENV["VAGRANT_DETECTED_OS"] = ENV["VAGRANT_DETECTED_OS"].to_s + " cygwin"

And it works! That is great, however the problem is Vagrant. I'm not 
familiar with the Vagrant culture, but is this seriously the best way to 
document long-standing essential workarounds. If you're not going to fix it 
that's one thing, but can it least be documented? The official documentation 
<http://docs.vagrantup.com/v2/synced-folders/rsync.html> says:

*"On Windows, rsync installed with Cygwin or MinGW will be detected by 
Vagrant and works well."*

Are all new users just supposed to spend 30 minutes sorting out this 
problem while the maintainers ignore it for another year? Very strange 
initial experience with Vagrant after hearing some good things.



-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to