-
Notifications
You must be signed in to change notification settings - Fork 35
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
config/spring.rb watched files not reloading app #2
Comments
I never got to implementing support for Listen 2.0 (see: #1), so probably only polling works. I'd probably need to find some spare time to do this (won't happen soon unless a lot of people need this - Newer versions of Listen have detailed debugging facilities, so you can check if it's not a Listen related issue (see https://github.com/guard/listen/wiki#issues-and-troubleshooting). |
Got it. However, is there a reason that :listen works for the default files added in application.rb? I'll just use polling for now but I am interested to figure out why it works in some cases but not others. |
@ajgrover - check the troubleshooting section I mentioned above - the Also, Listen watches directories, not files - so you'll want to check which directories are being watched, which files are being ignored, and which ones Spring is treating as relevant. |
I figured it out - the Listen gem ignores tmp/ by default (which isn't made clear in the docs). Thanks for your help! |
I am working on this rails issue and the expected behavior of
Spring.watch
inconfig/spring.rb
doesn't seem to be working for me. In a new rails app (using 4.2.0 on OS X 10.10.2) with spring-watcher-listen added to the Gemfile and config/spring.rb copied directly from the other issue, the config file is loaded and the files are added to the watcher BEFORE the default files are in https://github.com/rails/spring/blob/master/lib/spring/application.rb#L105-L112 at which time printing watcher.files shows all the files, including the ones added in config/spring.rb.However, spring only reloads the app when the files added to the watcher in application.rb are changed. Changing the other files seems to not do anything at all. Using
Spring.watch_method = :poller
, the expected behavior happens so this seems to me to be an issue with this gem. Any ideas why this is happening? I am relatively new to ruby/rails so I am not sure if this is a bug or operator error.The text was updated successfully, but these errors were encountered: