Hi Les
I just did a quick check to see if all is working fine on my machine:
$ mkdir testjammit
$ cd testjammit
$ echo "source '
https://rubygems.org'\ngem 'guard-jammit'\n" > Gemfile
$ bundle Fetching gem metadata from
https://rubygems.org/............
Fetching gem metadata from
https://rubygems.org/..
Resolving dependencies...
Using coderay (1.0.9)
Using cssmin (1.0.3)
Using ffi (1.8.1)
Using formatador (0.2.4)
Using rb-fsevent (0.9.3)
Using rb-inotify (0.9.0)
Using rb-kqueue (0.2.0)
Using listen (1.0.3)
Using lumberjack (1.0.3)
Using method_source (0.8.1)
Using slop (3.4.4)
Using pry (0.9.12.1)
Using thor (0.18.1)
Using guard (1.8.0)
Using jsmin (1.0.1)
Using jammit (0.6.6)
Using guard-jammit (1.0.1)
Using bundler (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
$ bundle exec guard init 09:52:18 - INFO - Writing new Guardfile to /Users/michi/testjammit/Guardfile
09:52:18 - INFO - jammit guard added to Guardfile, feel free to edit it
$ cat Guardfile # A sample Guardfile
# More info at
https://github.com/guard/guard#readme
guard :jammit do
watch(%r{^public/javascripts/(.*)\.js$})
watch(%r{^public/stylesheets/(.*)\.css$})
end
$ mkdir -p public/javascripts
$ mkdir -p public/stylesheets
$ mkdir config
$ echo "javascripts:\n common:\n - public/javascripts/*.js\nstylesheets:\n common:\n - public/stylesheets/*.css" > config/assets.yml
$ cat config/assets.yml
javascripts:
common:
- public/javascripts/*.js
stylesheets:
common:
- public/stylesheets/*.css
$ bundle exec guard 09:57:20 - INFO - Guard uses TerminalTitle to send notifications.
09:57:20 - INFO - Using Jammit version 0.6.6
Jammit Warning: No assets match 'public/stylesheets/*.css'
Jammit Warning: No assets match 'public/javascripts/*.js'
09:57:20 - INFO - Jammit successfully packaged the assets.
09:57:20 - INFO - Guard is now watching at '/Users/michi/testjammit'
[1] guard(main)> .touch public/stylesheets/style.css
Jammit Warning: No assets match 'public/javascripts/*.js'
09:57:42 - INFO - Jammit successfully packaged the assets.
[1] guard(main)> .touch public/javascripts/script.js
09:58:04 - INFO - Jammit successfully packaged the assets.
[1] guard(main)>
09:58:12 - INFO - Bye bye…
So all fine here, guard-jammit works as expected. Since rb-fsevent works fine, because the other Guard plugins are working, I assume you have a typo/wrong path somewhere (You write you touched inside `public/javascritpts`, but the path is `public/javascripts`.
You can always debug a watch method by providing a block, like
# A sample Guardfile
# More info at
https://github.com/guard/guard#readme
guard :jammit do
watch(%r{^public/javascripts/(.*)\.js$}) do |m|
puts "javascripts changed", m.inspect
m[0]
end
watch(%r{^public/stylesheets/(.*)\.css$}) do |m|
puts "stylesheets changed", m.inspect
m[0]
end
end
And then the output looks like
$ bundle exec guard 10:08:40 - INFO - Guard uses TerminalTitle to send notifications.
10:08:40 - INFO - Using Jammit version 0.6.6
10:08:40 - INFO - Jammit successfully packaged the assets.
10:08:40 - INFO - Guard is now watching at '/Users/michi/testjammit'
[1] guard(main)> .touch public/javascripts/script.js
javascripts changed
["public/javascripts/script.js", "script"]
10:08:42 - INFO - Jammit successfully packaged the assets.
[1] guard(main)> .touch public/stylesheets/style.css
stylesheets changed
["public/stylesheets/style.css", "style"]
10:08:45 - INFO - Jammit successfully packaged the assets.
[1] guard(main)>
10:08:47 - INFO - Bye bye…
I hope that helps
Michael
>> guard :jammit, :package_on_start => true do
>> watch(%r{^public/javascripts/(.*)\.js$})
>> watch(%r{^public/stylesheets/(.*)\.css$})
>> end
> You received this message because you are subscribed to the Google Groups "guard-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
guard-dev+...@googlegroups.com.