Jeff Davenport Jeff Davenport - 1 year ago 66
CSS Question

Split css and javascript files while in rails development

While in development mode, all my css and javascript files are combined into one, while in my browser inspector, I can only see the one css file Why is this happening? Thanks!

This is my layout code for those lines:

= stylesheet_link_tag 'application', media: 'all'
= javascript_include_tag 'application', 'data-turbolinks-track' => true, defer: defer ? :defer : false

Answer Source

I resolved the problem by changing this line to true in

config/environments/development.rb

config.assets.debug = true

# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.