New Discussion

Notifications

You’re not receiving notifications from this thread.

DataTables Install via Webpacker

4
General

Hi, Dan. Still in trouble? I managed to get a demo app running data-tables e others jquery library here: https://github.com/lucaszmoraes/Demo-Datatables-with-jQuery-Notifications

This demo is running Rails 6 with Webpack and Yarn.

According to the error that you describred at Datatables forum, looks like that you're missing to declare the jquery global variable '$'. Take a look to my environment configs (environment.js, app.js, etc) at the repo above.

Lucas, thank you! I must've tried 5 different things I found online. Your example was the only one that's worked.

Forgive me if I sound like an old man - but how the heck did this become so complicated when sprockets was so incredibly easy? How is webpacker an improvement here!?

I've literally tried like 7 different configs online and none of them work.

Join the discussion
Create an account Log in

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.