Ask A Question

Notifications

You’re not receiving notifications from this thread.

DataTables Install via Webpacker

Dan Tappin asked in General
Reply

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.

Reply

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

Reply

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!?

Reply

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

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.