I need precompile assets every time I've made any change to see difference in browser

余生长醉 提交于 2019-12-04 08:42:50

问题


Like as I mentioned in title - I have to precompile assets every time I've made any change to see how it looks like - I've tried config.assets.compile = true, without success.

I've also tried RAILS_ENV = 'development' but with same effect. Please help me because it is really annoying.

My system is running on:

  • Xubuntu
  • Rails -v: 3.1.1
  • Ruby -v: 1.9.2p290

I also tried:

config.action_controller.perform_caching = true

回答1:


One cause of this could be that you ran rake assets:precompile once. The server then uses public/assets exclusively, without trying to compile your assets on the fly.

Try removing the public/assets directory.



来源:https://stackoverflow.com/questions/8311619/i-need-precompile-assets-every-time-ive-made-any-change-to-see-difference-in-br

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!