-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Triggering file changes over VirtualBox shared folders #269
Comments
|
It looks like this is a VirtualBox issue. hashicorp/vagrant#707 |
|
Thanks for the info. You can force the use of the polling adapter, see my comment in issue #266 |
|
Hmm well I updated to the latest VirtualBox which is supposed to include the fix. I've also tried the polling method you mentioned with When touching the files on Windows, I can see that the last modified date reflects correctly but guard still isn't being triggered. Any suggestions? |
|
Does Guard show the message |
|
Yep, here is the full output |
|
Please can you try if it works with the Listen gem. Thanks! |
|
Guard 1.1.0 has been released with Listen integration, please give it a try and re-open the issue when you still have an issue with it. |
|
I've updated to Guard 1.1.0 and still having the same issue. My test involved and then initiating file saves on a few However, I have a strong feeling this is a VirtualBox issue. |
|
Since Guard 1.1.0 there's now a |
|
@netzpirat What would you recommend? Been doing something like this but with no success =( |
|
I didn't give a recommendation on purpose, because I didn't implement anything in the much improved Listen gem and have thus almost no knowledge in this area. Perhaps @thibaudgg or @Maher4Ever can join to help? From my understanding the polling listener compares the file mtime and also compares the content checksum on subsequent modifications. The latency is the time in between the polling adapter actions, in which it tries to find the modified files. According to this Virtualbox Ticket, the copied file now has the timestamp of the host os when it was copied into the shared folder and not the time when it was copied into the vm (do I understand this correctly?) So if the latency of the os->vm copy process is bigger the Guard's latency, the the file change will not be catched? In any case I would now try to decrease the Guard latency. Can you please analyse your inotify events, as described in the wiki and add your finding to it wiki. Perhaps this helps to understand the inotify issue. |
|
@netzpirat thanks for the Virtualbox ticket research! |
|
I updated to latest virtualbox, then installed guest additions, and then run guard with -p option. It works well now, but test runs twice if I modify file in Windows. When I try to "touch test.rb" in linux, it runs only 1 time. |
|
Using VirtualBox 4.1.18 with updated Guest Additions, the host being a MacOS X 10.7.4 and the guest an Ubuntu 10.04.3, I have to run guard with I understand the non-polling approach is not supported, but I'm getting this annoying double-trigger @vizakenjack is getting. Did someone find a neat solution? |
|
@rchampourlier have you the last version of Guard & Listen? |
|
@thibaudgg Sorry I did specify my OSes versions and I forgot Guard & Listen... Guard is 1.2.3 I think these are the latest versions? |
|
@rchampourlier yep it is, it difficult to know from where the double-trigger is coming, have you try with another editor? |
|
Updated Guest Additions to 4.1.18 and now working with polling (although ti can be a bit slow). I don't seem to be getting the double trigger problem. Thanks for the help guys! |
|
Guard is launched with:
|
|
@rchampourlier interesting and on a local file editing and saving with SublimeText/TextMate only triggers one time with polling? |
|
@thibaudgg I just tested on a local file with SublimeText and TextMate. We have the exact same behavior as through Vagrant. When the file is changed, we have a double trigger if guard is run with |
|
Ok, it could be an error in the polling adapter of Listen. Could you please paste the debug output of Guard when running with Also note that we are working to improve monitoring of remote filesystems events: guard/listen#57 |
|
I'm also hitting the double trigger issue each time I save an edit in Sublime on Win7 x64. I ran PS Separately, I'm defaulting to the polling adapter because the listen gem doesn't seem to notice file changes in my working directory. I've installed and removed combinations of rb-fsevent, rb-notifu, rb-fchange, and wdm, but guard doesn't pick up changes. But polling seems to work perfectly, except for this double trigger issue. |
|
@Maher4Ever do you have any thoughts on that one? |
|
Unfortunately, I wasn't able to reproduce the double trigger issue. Does anyone have a repeatable way to reproduce this issue? (preferably starting with a clean install of an operating system and ruby). |
|
I'm looking into a reproductible way. What would be the lowest-requirement-approach to test Guard triggering (without the need for a Rails/Sinatra project and the appropriate guards?). Is there a 'guard-test' for example? [EDIT] Just created a new guard: guard-self_test. |
|
Done! I've reproduced it on a fresh Vagrant box with Lucid32 and rbenv install of Ruby 1.9.3-p194. The test project is available on this repo. I've set the box to The test log is in this gist. We can see that editing a file in SublimeText causes two triggers, when all other cases trigger only once. The test procedure is:
|
|
I have the same issue with sublime. Hope you fix it soon. |
|
We have an issue opened on Listen about this issue, feel free to participate. Pull requests are welcome. |
I'm using vagrant on Windows with guard running on an Ubuntu VM. I can't seem to trigger file changes over the VirtualBox shared folder. If I touch the files within Ubuntu, it picks up the file changes (with
rb-inotify). Touching the files on Windows doesn't trigger anything, even with polling. Any suggestions?The text was updated successfully, but these errors were encountered: