Hello everyone... I'm facing a strange behaviour in the
--watchdir option from the command line. Seems that plugins ( for example Guard Sass ) completely ignore this setting. Is this possible? How can I fix this?
My setup is ( dots are only for brevity ):
- the Guardfile is in /.../code/ruby/guard/projects/test
- the project file are in /.../guardprojects/test
What I'm trying to do is to run guard from a not relevant path, watching the files in the project folder I specify using the specified Guardfile.
For example my guard command looks like this:
~$ guard start -G /.../code/ruby/guard/projects/test/Guardfile -w /.../guardprojects/test
So, from my home folder I'm starting guard with both an absolute path to the Guardfile and an absolute path to the watched folder ( which is different from Dir.pwd ).
For unknown reason the command do not work: files inside /.../guardprojects/test when modified raise an exception:
ERROR - Guard::Sass failed to achieve its <run_on_changes>, exception was:
> [#] Errno::ENOENT: No such file or directory - theme/sass/screen.sass
It seems that Guard watch the correct folder, while Guard Sass use only the relative path ( to the current folder in which Guard is started ) to perform their actions. I did not found the @watchdir variable to be passed to the plugin instance when created, so I'm reporting here this question.
My laptop:
- Ubuntu 12.04 64 bit
- RVM version 1.16.17
- ruby version 1.8.7 (2012-10-12 patchlevel 371)
- guard version 1.6.2
- guard-sass 1.0.2
Thanks for your help, Edoardo