guard-rsync icon indicating copy to clipboard operation
guard-rsync copied to clipboard

Nothing happens. What am I doing wrong?

Open kgust opened this issue 11 years ago • 3 comments

My environment

Linux Mint 14
rsync 3.0.9-3ubuntu1
Ruby 1.9.3p327
guard 1.6.2
guard-rsync 0.1.1
  • Added gem 'guard-rsync' to my Gemfile
  • Ran bundle install

Here's the section from my Guardfile

I've tried to simplify it as much as possible.

    guard 'rsync',
        :input => '/home/kgustavson/workspace/symfony2',
        :output => '/var/www/symfony'

Results from running guard start

Nothing seems to happen. The files are not sync'd to the output folder. No error messages.

Output from the guard window:

$ bundle exec guard --debug
09:49:48 - DEBUG - Command execution: uname
09:49:48 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
09:49:48 - INFO - Guard uses Libnotify to send notifications.
09:49:48 - INFO - Guard uses TerminalTitle to send notifications.
09:49:48 - DEBUG - Command execution: hash stty
09:49:48 - DEBUG - Guard starts all plugins
09:49:48 - DEBUG - Hook :start_begin executed for Guard::Rsync
09:49:48 - INFO - Guard is now watching at '/home/kgustavson/workspace/symfony2'
09:49:49 - DEBUG - Command execution: hash stty
09:49:49 - DEBUG - Start interactor
09:49:49 - DEBUG - Command execution: infocmp -C
09:49:49 - DEBUG - Command execution: infocmp -C -r
09:49:49 - DEBUG - Command execution: infocmp -C -r
09:49:49 - DEBUG - Command execution: stty size
09:49:49 - DEBUG - Command execution: infocmp -C -r
09:49:49 - DEBUG - Command execution: stty -a
09:49:49 - DEBUG - Command execution: stty -a
09:49:49 - DEBUG - Command execution: stty -g
09:49:49 - DEBUG - Command execution: stty -a
09:49:49 - DEBUG - Command execution: stty -a
09:49:49 - DEBUG - Command execution: stty  -echo -icrnl cbreak pass8 -ixoff
[1] guard(main)> rsync
09:49:57 - DEBUG - Command execution: stty 6d02:5:4bf:8a3b:3:1c:7f:15:4:0:1:ff:11:13:1a:ff:12:f:17:16:ff:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
[1] guard(main)> rsync
09:49:57 - DEBUG - Command execution: hash stty
09:49:57 - INFO - Run Rsync
09:49:57 - DEBUG - Hook :run_all_begin executed for Guard::Rsync
09:49:57 - DEBUG - Command execution: hash stty
09:49:57 - DEBUG - Command execution: stty -a
09:49:57 - DEBUG - Command execution: stty -g
09:49:57 - DEBUG - Command execution: stty -a
09:49:57 - DEBUG - Command execution: stty -a
09:49:57 - DEBUG - Command execution: stty  -echo -icrnl cbreak pass8 -ixoff
[2] guard(main)>

kgust avatar Mar 07 '13 15:03 kgust

Sorry, I originally wrote it to sync assets that weren't generated along side assets that were, so I've never used it without excludes, so I may have made specifying the excludes non optional.

krisselden avatar Mar 11 '13 17:03 krisselden

Ok. So, I added the excludes line from your example.

guard 'rsync',
    :input => '/home/kgustavson/workspace/visitmanager2',
    :output => '/var/www/symfony',
    :excludes => {
        /(.+)\.coffee$/ => (lambda {|m| "#{m[1]}.js"})
    }

It still doesn't work—nothing happens. I'm not seeing any error messages (other than what I've already shown). What's the best way to debug Guard plugins?

kgust avatar Mar 11 '13 20:03 kgust

I'm guessing you need to include a watch directive inside the block which you aren't yet passing to guard.

aspiers avatar Mar 12 '13 15:03 aspiers