我有rails项目和一个视图new.html.slim
:
我试过以下:
= javascript('app/vendor/assets/javascripts/handelbars.runtime.js')
= javascript('../../../vendor/assets/javascripts/handelbars.runtime.js')
= javascript('./vendor/assets/javascripts/handelbars.runtime.js')
但仍然404 Not Found
得到handelbars.runtime.js
vendor/assets/javascripts/
所有图书馆的正确道路是什么?
我不会包含handelbars.runtime.js
在 application.js 中
更新:
如果我在浏览器中查看路径:
http://localhost:3000/javascripts/vendor/assets/javascripts/handelbars.runtime.js
但我也得到:
Routing Error
No route matches [GET] "/javascripts/vendor/assets/javascripts/handelbars.runtime.js"
也只是为了测试:
Routing Error
No route matches [GET] "/vendor/assets/javascripts/handelbars.runtime.js"