Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zurb Foundation 5, modernizr not found

I get this when using Foundation 5.0.2.0 in production mode.

On Rails, Unicorn, NginX & Ubuntu.

"NetworkError: 404 Not Found - http://mydomain.com/javascripts/vendor/modernizr.js"
like image 660
Philip Avatar asked Nov 26 '13 18:11

Philip


3 Answers

Update 3/13/14

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


I had the same problem on heroku, the app would crash because it couldn't find modernizr.js. Here's how I fixed it:

  • 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
like image 100
d_rail Avatar answered Oct 17 '22 14:10

d_rail


I got the same error as you and I did this to fix it:

In config/environments/production.rb, set this:

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true
like image 45
sidney Avatar answered Oct 17 '22 16:10

sidney


Try updating the gem you're using for Foundation. This commit from five days ago may help you since it claims to add a missing modernizr.js file.

like image 44
pjmorse Avatar answered Oct 17 '22 15:10

pjmorse