-
Notifications
You must be signed in to change notification settings - Fork 248
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
Not listening to file changes, Ubuntu 14.04 #217
Comments
Hi @lasseebert, Debugging those issues is tough, but thanks for reporting this.
gem 'listen', git: 'https://github.com/chronomantic/listen', branch: 'for_debugging' so e.g. you'd have: gem 'guard' # latest released is fine
gem 'guard-bundler'
gem 'listen', git: 'https://github.com/chronomantic/listen', branch: 'for_debugging'
|
Hi @e2 Thanks for the quick response. I explicit added rb-inotify to the gemfile and bundled, but that did not help. I added the listen branch, so my gemfile looks like this:
Then started guard with When I save a watched file ( This is my guard output, which is outputted when guard starts:
I'm using Vim. |
For reference, this is my Guardfile:
As stated earlier, guard behaves as expected when using polling. |
(That's me editing a file in Vim). If you're getting output like above, then next download this: https://gist.github.com/e2/11251178 into your project directory and run as Then edit a file and paste the output. Then we should at least know exactly what's failing... |
awesome, thanks! |
Thanks @e2, you led me in the right direction. Running
So i edited the max_user_watches file and increased number of watches per user from 8196 to 81960. Now Guard runs as expected again! :) For my sake this issue can be closed now, but I'm keeping it open in case some of this should be in the README. |
|
@lasseebert, could be dropbox or some file-indexing utility that's eating up those watches - but that's nothing to worry about, since even dropbox tells people to set it to 100,000. Listen should have shown an error with a link to this: |
@e2, after upgrading to Listen 2.7.2, I get the warning:
Thanks |
Thanks for reporting this and taking the time to do so, @lasseebert ! |
I thank you :) Keep up the great work. |
I have the issue with kate. |
@dima4p - in your case, guard is not detecting Kate's saving as a modification, but as adding a new file (which guard-rspec ignores). Upgrade your If that still doesn't work, run guard with: LISTEN_GEM_DEBUGGING=1 bundle exec guard ... so I kind find out what Kate is doing different, thanks! |
$ LISTEN_GEM_DEBUGGING=1 bundle exec guard |
@dima4p - thanks so much! I can see what's wrong now. Could you check to see if this branch fixes everything?:
( |
Hi, I have the same issue as described in the first post of this thread. I've done everything until this:
inotifywait seem to work properly. But, the test_inotify.rb script does not work, here is my output when I interrupt it:
The each / watch / block in watch part is repeating itself a looot (as if there is an infinite loop or something... ) I'm quite stuck with this issue :) thanks. ;) --- [ Edit ] after doing some investigations it seems that guard/listen is no longer ignoring folders such as .git, node_modules, tmp and others... Where could it come frome? --- Did a little bit more investigations, the bug seems to be related to my project somehow, my project is a fork of the Canvas Lms open source project, and when I run guard in the master branch (without any modifications) it just never enters the interactive mode as if it is loading too much files (but in the stable branch, it works). I've posted a message on their google group, I'll wait and see if they answer and give you the feedback here as it may reveal a bug. |
Ok I've found the problem: A symlink file was linking to the root folder of my application (don't ask me why, it is an open source application). Thus, guard/listen was following this file again and again, creating an infinite loop. Could that be considered as an issue because it easily creates an infinite loop? |
Thanks @Kulgar for the info - it could be a problem with rb-inotify (which resolves symlinks as it walks the tree AFAIR) or how Listen uses it. (Symlinks are still a work in progress: #25) Could you open up a new issue with an example of the symlink? (Just so you get notified when it's fixed, and move the discussion there, etc.) |
@e2 Done 😄 |
I got a simple solution, Run this cammand in your Ubuntu 14.04 terminal echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers That is all. |
Not sure exactly what is going on, but I am pretty sure my problems started after upgrading to Ubuntu 14.04 (from 13.10).
Short description: Guard does not react to any file changes at all.
Longer description:
My exact setup used to work on ubuntu 13.10. After upgrading no file changes are registered with Guard and Listen.
I have tried the following:
When running guard with
bundle exec guard start --force-polling
it listens as expected (but with polling of course).I have tried to run with
--debug
but nothing odd shows up.I am using Ruby 2.1.1 installed with rbenv.
The text was updated successfully, but these errors were encountered: