[英]javascript_include_tag file is missing on the production environment ( 404 )
[英]/assets 404 on javascript_include_tag
在我看來:
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<%= javascript_include_tag "modernizr" %>
檢查元素:
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
(ERROR IN RED):GET http://my-server.dev/assets/ 404 (Not Found)
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<script src="/assets/modernizr.js?body=1" type="text/javascript"></script>
我可以輕松地使用stylesheet_link_tag。 為什么javascript代碼獲取404?
這取決於您的應用程序/資產,庫/資產或供應商/資產的位置。 如有疑問,請指定瀏覽器應查找的完整路徑。
參考: http : //guides.rubyonrails.org/layouts_and_rendering.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.