Ask A Question


You’re not receiving notifications from this thread.

Webpacker noob - so I saw your video and im using rails 6

Gus P asked in Rails

how does one go by installing with webpacker?

yarn add isotope-layout

now I get an error

          - @staff.each do |faculty|
              - if faculty.profile.attached?
                = link_to image_tag(url_for(faculty.profile)), '#', class: 'card-img-top'
                = link_to "#" do
                      = faculty.staff_title
                    = faculty.title

    // options
    itemSelector: '.card-wrapper',
    layoutMode: 'fitRows',
    percentPosition: true,
    gutter: 10

(index):311 Uncaught TypeError: $(...).isotope is not a function
    at (index):311

I checked to see if isotope was there in the pack_tag its there am I missing something?


Figured it out


var jQueryBridget = require('jquery-bridget');
var Isotope = require('isotope-layout');

jQueryBridget( 'isotope', Isotope, $ );

Sheesh !

Join the discussion
Create an account Log in

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

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

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

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.