I'm trying to use a Foundation 5 Orbit slider in my rails 4 app and it works perfectly in the develop environment but not in production on Heroku. When I use Chrome's Developer Tools to see what's going on it says it cannot find foundation.js. On the page itself the first image shows but the navigation controls and next images do not.
I'm using Foundation via the 'foundation-rails' gem (5.0.2). I've tried manually placing the foundation.js file into the vendor/assets/javascripts folder as well as the app/assets/javascripts folder, but neither works.
My applications.js file looks like this:
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require foundation
$(function(){ $(document).foundation(); });
and I have the following in my application.html head:
<%= javascript_include_tag "application" %>
<%= javascript_include_tag "vendor/modernizr" %>
<%= javascript_include_tag "//code.jquery.com/jquery-1.10.2.min.js" %>
and in the body:
<%= javascript_include_tag "foundation" %>
I've tried multiple things, such removing the application js reference from the head and putting it into the body, removing the foundation JS reference from application.js and the body of application.html, but none seem to work.