未找到Zurb Foundation 5,modernizr [英] Zurb Foundation 5, modernizr not found
问题描述
在生产模式下使用Foundation 5.0.2.0时,我会得到这个信息.
I get this when using Foundation 5.0.2.0 in production mode.
On Rails,Unicorn,NginX& Ubuntu.
On Rails, Unicorn, NginX & Ubuntu.
"NetworkError: 404 Not Found - http://mydomain.com/javascripts/vendor/modernizr.js"
推荐答案
更新3/13/14
我在 foundation-rails-5.1.1.0 的heroku上没有这个问题.在头中添加javascript_include_tag "vendor/modernizr"
是可行的.我可以删除复制到供应商目录中的modernizr,并删除app.js中的多余行
I don't have this problem on heroku with foundation-rails-5.1.1.0. Adding javascript_include_tag "vendor/modernizr"
in the head works. I could remove the modernizr I copied to the vendor directory and remove the extra line in app.js
我在heroku上遇到了同样的问题,该应用程序将崩溃,因为它无法找到modernizr.js.这是我的解决方法:
I had the same problem on heroku, the app would crash because it couldn't find modernizr.js. Here's how I fixed it:
- 将modernizr.js从基础(无论使用捆绑程序安装在哪里)复制到 vendor/assets/javascripts/.
- 在application.js的
//= require_tree .
下添加//= require modernizr
. - 从application.html中删除
javascript_include_tag "vendor/moderizr"
- Copy modernizr.js from foundation (wherever you installed it with bundler) into vendor/assets/javascripts/.
- Add
//= require modernizr
below//= require_tree .
on application.js. - Remove
javascript_include_tag "vendor/moderizr"
from application.html
这篇关于未找到Zurb Foundation 5,modernizr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!