Rails 3.1 remote requests submitting twice

﹥>﹥吖頭↗ 提交于 2019-11-27 12:54:17

If you have precompiled the assets and running in development mode, then the JavaScripts will be included twice on the page.

Remove everything from public/assets if in development mode.

Adding config.serve_static_assets = false to development.rb will prevent loading files from /public/assets.

Actually I need to precompile locally because my test mode is using only static assets from /public/assets - tests are catching possible production asset problems. How? Just set config.assets.compile = false and config.serve_static_assets = true in test.rb configuration.

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