Having a hard time figuring out how to make SASS, not SCSS, as the default for stylesheets.
I've tried making a sass_config.rb
file with this:
Sass::Plugin.options[:syntax] = :sass
Sass::Plugin.options[:style] = :compressed
I've also tried adding that to the environment.rb file. Either way I get this error:
.../config/environment.rb:7:in `<top (required)>':
uninitialized constant Sass::Plugin (NameError)
For rails 3.1.rc4, you could set the config:
config.sass.preferred_syntax = :sass
in the application.rb
file
I added the following to config/environments/development.rb
:
config.sass.preferred_syntax = :sass
That did the trick.
Do require 'sass/plugin'
and make sure it's at the bottom after your Application.initialize!
call.
I definitely prefer sass to scss too - have you considered just using the compass gem for all your CSS, and adding preferred_syntax = :sass
to config/compass.rb
I haven't tested this out yet on rails 3.1 yet but it works in 3.0.7
EDIT
As a troubleshooting step, what happens when you remove just the first line of code from sass_config.rb so that it just has the second one? Do both these lines cause the error?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With