ruby on rails - What exactly "config.assets.debug" setting does? -


i have started development of simple rails application. after several hours work have notices somehow deleted css still applied web pages.

in order fix issue executed following actions several times:

  1. stop/start server
  2. use rails server
  3. use torquebox server
  4. delete browser cache

but nothing changes. strange - new css definitions applied, have deleted still there. so, gave , decided create new project.

i have setup new project (its scaffold same first one) , when open 1 of views, styles old project applied too. have decided again http://guides.rubyonrails.org/asset_pipeline.html , find out setting

#expands lines load assets config.assets.debug = false 

solves issue. option doing exactly? why old projects css applied when true?

this option's effect described in this post, i'll summarize here well. value of changing config.assets.debug lies in compromise between page load time in development , ease of debugging.

basically:

config.assets.debug = true: assets served individually, organized see them in development. preprocessed languages sass or coffeescript still show target languages (i.e., css , js, respectively).

config.assets.debug = false: assets bundled files application.css , application.js. error stack traces not have correct line number more , harder map original code.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -