"uninitialized constant Sass::Script" after upgrade 4.0.5 -> 5.0.1
rvrm opened this issue · comments
(..)/gems/ruby-2.1.2/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>': uninitialized constant Sass::Script (NameError)
Running Rails 4.2.0. Happened to anyone else yet?
This constant is defined by sass gem. If you are getting this error the gem is not being loaded. As we require 'sprocekts/sass_functions' and it require sass I don't see how this is a problem on this gem.
Let us know if you can reproduce the error in an empty application.
I encountered same issue after changing version number 4.0.5
to 5.0.1
, moved back because i found no fix for that issue.
I was able to track down two gems which seemingly caused problems in my setup:
"Haml" and "Coffee-Filter"
The "haml" gem I upgraded to version 4.0.6. The "Coffee-Filter" gem I could remove from the gemfile (no longer needed).
For testing purposes I reinstalled the latter again to verify: The "uninitialized constant" error message then appeared again.
Obviously this is no final evidence, just posting it here to maybe help you with your setup.
For posterity: I saw this briefly while experimenting with the Sprockets 3 beta today. Turns out I needed the sass
gem to be explicitly required before sass-rails
and sprockets
. Easy enough!
Thanks for the tip @nz! 🍻
Thanks @nz!
bundle update sass-rails
did the trick for me when upgrading to Rails 4.2.2.
Thanks @jfine . Ran into this issue after upgrading from Rails 4.2.2 and that fixed it for me
Glad to help @quainjn
@nz for president. Thanks for the fix =)
Thanks @jfine, just ran into the same issue and your suggestion helped me!
Observed with sprockets >= 3
, sass-rails < 5.0.2
. sprockets
once required sass
. That allowed sass-rails
to get away with not requiring it. Fixed in sass-rails-5.0.2
. So either not update sprockets
, or update sass-rails
.