我无法让Guard执行任何操作。 我正在使用:
3.14.14
)Guardfile只是来自Understanding guard
的全能 guard :rspec, cmd: "bundle exec rspec" do
watch(/(.*)/) { |m| Guard::UI.puts "Unknown file: #{m[1]}"; nil }
end
以下是$ LISTEN_GEM_DEBUGGING=2 bundle exec guard -d
I, [2015-02-04T08:11:34.995518 #25370] INFO -- : Celluloid loglevel set to: 0
I, [2015-02-04T08:11:34.997566 #25370] INFO -- : Listen version: 2.8.5
08:11:35 - DEBUG - Notiffany: gntp not available (Please add "gem 'ruby_gntp'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: growl not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Notiffany: terminal_notifier not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Notiffany: libnotify not available (Please add "gem 'libnotify'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: notifysend not available (Please add "gem 'notify_send'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: notifu not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Command execution: emacsclient --eval '1'
08:11:35 - DEBUG - Notiffany: emacs not available (Emacs client failed).
08:11:35 - DEBUG - Notiffany: tmux not available (:tmux notifier is only available inside a TMux session.).
08:11:35 - DEBUG - Notiffany: file not available (No :path option given).
08:11:35 - DEBUG - Notiffany is using TerminalTitle to send notifications.
08:11:35 - DEBUG - Command execution: hash stty
08:11:35 - DEBUG - Guard starts all plugins
08:11:35 - DEBUG - Hook :start_begin executed for Guard::RSpec
08:11:35 - INFO - Guard::RSpec is running
08:11:35 - DEBUG - Hook :start_end executed for Guard::RSpec
D, [2015-02-04T08:11:35.245730 #25370] DEBUG -- : Adapter: considering TCP ...
D, [2015-02-04T08:11:35.245850 #25370] DEBUG -- : Adapter: considering polling ...
D, [2015-02-04T08:11:35.245900 #25370] DEBUG -- : Adapter: considering optimized backend...
I, [2015-02-04T08:11:35.286148 #25370] INFO -- : Record.build(): 0.03905487060546875 seconds
08:11:35 - INFO - Guard is now watching at '/media/I/08projects/programming/rails/tests/guard_test'
08:11:35 - DEBUG - Start interactor
[1] guard(main)> D, [2015-02-04T08:11:44.639225 #25370] DEBUG -- : inotify: app/controllers/users_controller.rb ([:attrib])
D, [2015-02-04T08:11:44.639598 #25370] DEBUG -- : raw queue: [:file, #<Pathname:/media/I/08projects/programming/rails/tests/guard_test>, "app/controllers/users_controller.rb", {:change=>:modified}]
D, [2015-02-04T08:11:44.640532 #25370] DEBUG -- : inotify: app/controllers/users_controller.rb ([:close, :close_write])
D, [2015-02-04T08:11:44.640733 #25370] DEBUG -- : raw queue: [:file, #<Pathname:/media/I/08projects/programming/rails/tests/guard_test>, "app/controllers/users_controller.rb", {:change=>:modified}]
据我所见,listen会检测文件更改但由于某种原因不会将其转发给警卫