Closed aaronchi closed 12 years ago
Could you paste your Gemfile and Guardfile and describe what you did to get the error please.
All I do is add guard-sass to gemfile and if I start guard, it errors. Error is also reported here (https://github.com/chriseppstein/compass/issues/824) but this seems to be dependent on guard-sass being in the gemfile. Even when compass is not loaded, it still errors.
That issue is totally unrelated to guard-sass, if you are using compass then maybe you should be using guard-compass instead of guard-sass.
Actually, it seems like guard-sass is trying to use sass before Rails.root is available?
I’ve found a solution. guard-sass
doesn’t need rails to work. So if you put it into a bundler group which isn’t loaded by Rails everything is ok. For example,
group :railsless do
gem 'guard-sass'
end
I've also run into this issue and I've devised another workaround:
gem 'guard-sass', :require => false
Perhaps this problem is because of this commit bab96abd5da8eb?
I've also run into this after a bundle update.
In lib/guard/sass.rb, if you reinstate the two autoload lines from 0.6.0, and comment out the requires at the bottom, things appear to work again. This suggests commit bab96ab is the source. But this is odd, considering the stack trace identifies the "require 'sass/plugin'" on line 1 as the source.
For extra measure, I tested each require statement separately. Either one causes the error.
For now, I'm running 0.6.0.
Doh. Not really looking at my configuration. :require => false works fine.
This was helpful to me too - :require => false worked.
dito! thx (also makes perfect sense)
mine looks like this now:
group :development do
gem 'guard-livereload', require: false
gem 'guard-sass' , require: false
gem 'rack-livereload'
gem 'rb-fsevent', require: false
end
Also check the gem using sass is required after sass
I'm getting this after upgrading to guard 1.1