1

I've updated my app to use the rails 3.1 asset pipeline (I think). I can compile .css files but not css.scss. I am running the sass-rails gem but nothing seems to work.

What should I check? Sorry, I don't know exactly what info I should supply here to help debug. I can edit this...

EDITS:

My .scss file contains:

/*
*= require_self
*= require_tree . 
*/

edit: see Sprockets::CircularDependencyError in Store#index

Thanks, Rim

Community
  • 1
  • 1
Rimian
  • 36,864
  • 16
  • 117
  • 117

1 Answers1

3

Remember that css.scss files need to be included, not imported like the rest:

So: Turn you application.css into an application.css.scss, and do like this in it:

/*
*= require ./normal/custom.css
*= require_self
*/

@import "normal/design/control_panel";
Houen
  • 1,039
  • 1
  • 16
  • 35
  • Thanks for the quick answer. Yes, that seems right. I'll edit my question. – Rimian Jan 10 '12 at 12:50
  • I removed *= require_tree . which was causing some circular dependency issues. – Rimian Jan 11 '12 at 01:23
  • Also see: http://stackoverflow.com/questions/7462661/sprocketscirculardependencyerror-in-storeindex/8813029#8813029 – Rimian Jan 11 '12 at 01:30
  • Not exactly... you should `@import "normal/design/control_panel"` (no file extension). And yeah, `require_tree` means `require everything in this directory and all children`. Pretty weird that by default Rails says "include all CSS in all pages always", huh? – AlexChaffee Sep 10 '14 at 13:49