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

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -