Closed ekremkaraca closed 5 years ago
The rails default application.css tried to load entire scss files in assets/stylesheets/lines folder based on *= require_tree .
while stylesheet/lines/application.scss(lines default stylesheet) has responsibility to load other scss files.
So, changing rails default application.css like this would solve the problem:
*= lines/application
* require_tree .
* require_self
Here is how I fix this issue,
I imported module of variables in each file wherever I was facing that error.
@import 'variables_and_mixins';
add this line to all your css files which are using those variables in css like article.scss, footer.scss, general.scss etc...
Mixing SASS @import
with sprockets' //require
will not work out of the box. You could also try to remove sprockets syntax from your master stylesheet and replace it with SASS @import
syntax.
There's also the sprockets-sass gem that could solve the issue.
I'll adress this in one of the future releases of lines.
Remove all content from main css manifest file stylesheets/application.scss and just write
@import 'lines/application'
in it. This works for me now. Remove require_tree and require_self .
Just removing the line
*= require_tree .
should be fix the issue. So you're left with something like:
*= require lines/application
*= require_self
I was able to resolve the issue in my Rails 5 app by moving 'assets/stylesheets/lines' to 'vendor/lines' and adding *= vendor/lines/application
to the application.css file.
Hey guys!
I installed your gem and configured with default values to give it a try on Rails 5 with Postgresql 9.5. After setup, when I hit blog page, I got error mentioned on title. Here are full log: