Why does rake assets:precompile in development cause problems but not in my production environement

落爺英雄遲暮 提交于 2019-12-05 14:06:33

Ok i seem to have solved it.

In environments/development.rb change this line

config.assets.debug = true

to this

config.assets.debug = false

Not sure why this works but from reading the rails guides and quote:

"When debug mode is off, Sprockets concatenates and runs the necessary preprocessors on all files. With debug mode turned off the manifest above would generate instead:"

<script src="/assets/application.js" type="text/javascript"></script>

Hope this helps someone with similar issues.

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