foundation/foundation-rails

foundation.js asset is empty

brandoncc opened this issue · 2 comments

I'm experiencing:

Uncaught TypeError: $(...).foundation is not a function

This is my application.js:

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
// vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require foundation
//= require_tree .
//= require_self

$(function () { $(document).foundation(); });

I have:

gem 'jquery-rails'
gem 'foundation-rails'
gem 'autoprefixer-rails'

in my Gemfile.

My application is Rails.6.0.0.rc1 without turbolinks. The content of foundation.js (when I look at the sources tab in dev tools) is 18 blank lines. Does anybody know why this might be happening?

Hi @brandoncc,

Please provide all steps to reproduce this and provide a link to a repository asbreproducible testcase.

Thanks for the response @DanielRuf. I'm not using it anymore, closing.