Why doesn't Zurb Foundation support Rails 6 anymore?

It appears to me that Zurb has bailed on us rails developer and is leaving us swinging. I see in some posts related to the issues with zurb running in a rails 6 environment that the answers appear to all state ''it works out of the box" when clearly it doesnt.

I have been f’ing around with Zurb Foundation 6.6.3 and Rails 6.0.2.2. and cannot get something as simple as a title-bar to work.

I installed foundation sites using yarn
yarn add foundation-sites jquery motion-ui

The app/javascript/src folder was added and the applicatipn scss was added to this folder and populated with

@import '~foundation-sites/dist/css/foundation';
@import '~motion-ui/motion-ui';

app/pack/application.js has been modified by adding the fololwing below

require("channels")

require("jquery")

import "foundation-sites"
require("src/application")

$(document).on('turbolinks:load', function() {
  $(document).foundation()
});

my app.views/layouts/application.html.erb has been modified to include

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>

When I run my app the title-bar copied directly from the Navigation - Responsive Navigation in the foundation 6.6.3 docs

fails to data-hide-for=“medium”, kinda important seeing as what I want is a navbar that is responsive so desktop and mobile devices.

After f’ing around for far too long (a couple of weeks, try this tery that google, google google) I’ve just packed it on Foundation as they don’t support Rails 6 anymore it appears and with nonsense answers like ’ well… foundation works out of the box’ it appears they (Zurb) have no intention of resolving whatever the underlying issue with their codebase and turbolinks or whatever other issues are out their causing their code to fail in rails apps.

I installed Bootstrap 4 and got my app up and running in a few hours (scassc 2.3.0 was an issue but a gem changes to 2.3.1 fixed that in short order) and although I’ll need to refactor my grid into the Bootstrap grid system at least it works which is way more than I can say for Foundation.

5 years of Zurb Foundation wasted now I need to get on Bootstrap.

Sad sad day… Zurb is now sounding like the big unresponsive outfits out there, guess they’ve gotten too big so having us rails folks migrate to bootstrap or React, or Materialize or whatever that isn’t Zurb may help them as they’ll have one less platform to support.

The templates work out of the box.

Please provide a small repository as reproducible testcase so we can help you.

Also see Issues with Ruby on Rails and Foundation Sites 6

Rails changed to webpacker and so the way to install Foundation Sites has changed.

Not sure why you want to import the css in the scss file. But please check the output of webpacker and if it fails. Also check the browser console for errors.

Not sure if this triggers on document ready. jQuery has an extra wrapper for this.
https://api.jquery.com/ready/

Also the JS should be loaded at the end of the body right before </body>. As you did not provide any repo for us to reproduce this we can not help much but guess things.

Interesting. I am working fairly successfully with Rails 6.0.3.1 and Foundation.
However I have ditched webpacker and am using webpack and mini-pack instead.