sass-rails: file.css(.scss).erb causes `File to import not found or unreadable`

Using the ERB handler breaks reading/importing the files…

This works:

// application.css.scss:
@import 'tester'

// tester.css(.scss)
body { color: #ABC; }

This does not:

// application.css.scss:
@import 'tester'

// tester.css(.scss).erb
body { color: #ABC; }

Sass::SyntaxError: File to import not found or unreadable

At first I thought it was related to #119 or #94, but those fixes don’t solve my problem. I do use Rails 4.0.0.beta1 (together with sass-rails 4.0.0.beta1), so perhaps this could be related?

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 35 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Issue ongoing in 2018.

I;m still having the same issue. sass-rails (5.0.6). “rails”, “~> 5.1.0.beta1”

Lol, having the same problem again after 1,5 years…

It looks like .scss.erb file doesn’t work in subfolders, moving it to the assets/stylesheets folder directly worked for me.

a year later and I’m experiencing the same problem - does .scss.erb still not work in subfolders with sprockets 4 manifest? or is my setup wrong somehow?