How to link scss file with style sheet link tag in Ruby on Rails -


<%= stylesheet_link_tag 'main', media: 'all', 'data-turbolinks-track' =>true  %> 

ruby on rails seems assume it's main.css , throw error.

how link correctly main.scss?

only application.css.scss precompiled default. files required through file compiled. normally, request other files within file using either *= require_tree , *= require_self or @import.

if still want explicitly include main.css.scss using stylesheet_link_tag in question, need add list of precompiled assets in config/initializers/assets/ so:

rails.application.config.assets.precompile += %w( main.css ) 

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -