I'm working on a rails app and was trying to integrate this gem for a text field
https://github.com/exAspArk/rails-jquery-tokeninput
However, I get the same console error: ".tokenInput is not a function" as when I try to do this without the gem (manually adding the js and css to the pipeline). I have the gem installed correctly, and this in my _form.html.erb
<% names = [{name: "test", name: "another test name", name: "third name test 123"}] %>
<%= f.label :user_tokens, "Debaters" %>
<%= f.text_field :user_tokens, 'data-tokeninput' => {collection: names}.to_json %>
I have properly requires the javascript in my application.js and I do receive token-input.js in the browser so the scripts are loaded properly, but for whatever reason it seems to not recognize the tokenInput function.
Is there something i'm missing with the asset pipeline or loading the proper gems? If someone has experience working with this gem or knows what I'm missing with including the proper javascripts, i'd greatly appreciate any help!