2014-10-28 31 views
2

我設置了Yosemite的全新安裝,無論何時更改文件都無法防範。Guard不再使用Yosemite OSX檢測文件更改10.10

我的環境:

guard (2.6.1) 
guard-minitest (2.2.0) 
rubygems-bundler (1.4.4) 
Ruby 1.9.3 and 2.0.0 both have been testing 

下面是調試輸出:

[email protected]:~/Sites/tick (master)$ LISTEN_GEM_DEBUGGING=2 bundle exec guard -d 
I, [2014-10-27T15:34:53.417196 #1059] INFO -- : Celluloid loglevel set to: 0 
15:34:53 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A' 
15:34:53 - INFO - Guard is using TerminalTitle to send notifications. 
15:34:53 - DEBUG - Command execution: hash stty 
15:34:53 - DEBUG - Guard starts all plugins 
15:34:53 - DEBUG - Hook :start_begin executed for Guard::Minitest 
15:34:53 - INFO - Guard::Minitest 2.3.2 is running, with Minitest::Unit 4.7.5! 
15:34:53 - DEBUG - Hook :start_end executed for Guard::Minitest 
15:34:53 - INFO - Guard is now watching at '/Users/tom/Dropbox/Sites/tick' 
15:34:53 - DEBUG - Command execution: sysctl -n hw.ncpu 
D, [2014-10-27T15:34:53.517668 #1059] DEBUG -- : Adapter: considering TCP ... 
D, [2014-10-27T15:34:53.517749 #1059] DEBUG -- : Adapter: considering polling ... 
D, [2014-10-27T15:34:53.517776 #1059] DEBUG -- : Adapter: considering optimized backend... 
I, [2014-10-27T15:34:53.587089 #1059] INFO -- : Record.build(): 0.06837701797485352 seconds 
15:34:53 - DEBUG - Command execution: stty -g 2>/dev/null 
15:34:53 - DEBUG - Start interactor 
[1] guard(main)> 

我不知道如何測試底層聽寶石,但好像它是相關的。我已經確認警衛可以正常使用輪詢(bundle exec guard start --force-polling)。

回答

1

我能夠通過將文件移出Dropbox來解決我的問題。一旦我看到這個工作,我知道Dropbox在某種程度上造成了文件系統的問題。我通過刪除文件夾並通過Dropbox重新添加文件夾解決了這個問題,現在一切都像以前一樣工作。

0

我有同樣的問題,只能感謝我修復LiveReload應用程序發出的警告。 因爲問題不限制於Dropbox和/或Ruby on Rails的,我想分享我所做的:

  • 重命名問題文件夾(在包含Guardfile我的情況)
  • 與舊創建新的文件夾文件夾從舊到新的文件夾名稱
  • 移動文件

通過LiveReload提到的其它解決方案是:

  • 重新啓動計算機
  • 檢查磁盤,並通過磁盤工具
  • 修復權限添加的文件夾,聚光燈隱私列表(文件夾不索引列表),然後從中取出,有效地迫使 編制索引
  • 重命名文件夾,然後重命名可能回
  • 重新創建文件夾並移動舊的內容返回到它

瞭解更多:http://feedback.livereload.com/knowledgebase/articles/86239

這不但修復了我的Guard問題,而且還允許Compass watch再次運行。

0

添加了rb-fsevent寶石嗎?

group :development, :test do 
    gem 'rb-fsevent' if `uname` =~ /Darwin/ 
end 

如果您使用OS X,它將被用於OS X FSEvents API。