Closed tobinbradley closed 11 years ago
Did some more debugging (if you can call it that with my Ruby skills), and I have it fixed good enough for me. I'll leave it open here because it isn't quite working like it was in case anybody wants to dig into it more.
The :all_on_start
option was causing the error. Here was the original line, which causes the error:
guard 'sass', :input => 'assets/sass', :output => 'public/css', :line_numbers => true, :all_on_start => true
And taking out :all_on_start => true
made the error go away and everything seems to work again:
guard 'sass', :input => 'assets/sass', :output => 'public/css', :line_numbers => true
Here's the whole original Guardfile (with all_on_start
still there):
# sass to css
guard 'sass', :input => 'assets/sass', :output => 'public/css', :line_numbers => true, :all_on_start => true
# This will concatenate the javascript files specified in :files to js/main.js
guard :concat, type: "js", files: %w(vendor/bootstrap/bootstrap-tooltip vendor/bootstrap/bootstrap-modal vendor/bootstrap/bootstrap-transition vendor/bootstrap/bootstrap-button vendor/bootstrap/bootstrap-popover vendor/bootstrap/bootstrap-alert vendor/jquery-ui-1.10.0.custom.min plugins map page), input_dir: "assets/scripts", output: "public/js/main"
# live reload
guard 'livereload' do
watch(%r{public/js/.+\.(js)$})
watch(%r{public/css/.+\.(css)})
watch(%r{public/.+\.(html)$})
end
It doesn't preprocess SASS on start now of course, but I can live with that. It worked fine on 12.10, so there was probably a library change in 13.04 somewhere.
Thanks so much for guard-sass, it's awesome!
Great, I'm glad you've found a fix for it. I will look into the cause when I get time.
Bit more for debugging purposes.
# sass to css
guard 'sass', :input => 'assets/sass', :output => 'public/css', :line_numbers => true, :all_on_start => true
# live reload
guard 'livereload' do
watch(%r{public/js/.+\.(js)$})
watch(%r{public/css/.+\.(css)})
watch(%r{public/.+\.(html)$})
end
Kaboom.
# sass to css
guard 'sass', :input => 'assets/sass', :output => 'public/css', :line_numbers => true, :all_on_start => true
# live reload
guard 'livereload' do
watch(%r{public/js/.+\.(js)$})
#watch(%r{public/css/.+\.(css)})
watch(%r{public/.+\.(html)$})
end
No errors (but Livereload isn't watching CSS).
# sass to css
guard 'sass', :input => 'assets/sass', :output => 'public/css', :line_numbers => true
# live reload
guard 'livereload' do
watch(%r{public/js/.+\.(js)$})
watch(%r{public/css/.+\.(css)})
watch(%r{public/.+\.(html)$})
end
No errors, but doesn't preprocess SASS on start (I can live with that).
It looks like guard-livereload and guard-sass are head-butting there somehow. Beats me though - I haven't even done a Ruby hello world :).
Hi, I think I may have fixed the issue in the course of fixing #45. If you have time could you test out guard-sass
version 1.1.0 (it's on rubygems) with :all_on_start => true
and report back. Thanks.
Fixed! Thanks for the help. Guard-sass is awesome!
I'm getting an error when guard starts on Ubuntu 13.04. Other than running guard I'm a total ruby noob and I have no idea what to do. I didn't get any error messages during installation of ruby or any of the gems, and ruby --version yields ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]. After the error message guard doesn't watch/update sass, but livereload and concat seem to be working fine. My only guards being loaded are guard-sass, guard-concat, and guard-livereload. It did work fine on 12.10, and I don't think any Ruby libraries changed versions (it was Ruby 1.9.3 on 12.10 as well).
Here's the guard error message. Any help would be greatly appreciated!
19:44:11 - INFO - Guard uses TerminalTitle to send notifications. 19:44:12 - INFO - Sass [0.50s] main.scss -> main.css
19:44:12 - ERROR - Guard::Sass failed to achieve its <start>, exception was: