Closed benkoshy closed 6 years ago
Hi,
I don't know if it will resolve your problem, but with kind of similar one I tried to use //= require select2-full
instead of //= require select2
and everything was fine again, so maybe you should try... ?
I've got the same problem.. But it's only in production. In development it works fine!
I've tried //= require select2-full
but it still gives me the error. Only in production though.
Uncaught TypeError: $(...).select2 is not a function
at HTMLDocument.<anonymous> (new:87)
at HTMLDocument.dispatch (application-f67d75a….js:2)
at HTMLDocument.m.handle (application-f67d75a….js:2)
at Object.trigger (application-f67d75a….js:2)
at pt.fn.init.triggerHandler (application-f67d75a….js:2)
at Function.ready (application-f67d75a….js:2)
at HTMLDocument.a (application-f67d75a….js:1)
@BKSpurgeon move //= require jquery_ujs to top
//= require jquery //= require jquery_ujs //= require jquery.turbolinks //= require dataTables/jquery.dataTables //= require turbolinks //= require select2 //= require_tree .
Moving //= require select2
above //= require_tree .
in application.js solved the problem for me.
@argerim @BKSpurgeon Hi, do you guys still have this problem? If it only happens on production, then check if there is any error in js files required before select2
. The error causes the application.js
not fully loaded, that's why very often moving //= require select2
upward could solve this issue.
Still having this issue. Can we fix it?
@AlexGravenSparkfly @shunwen Unfortunately I cannot help you at this stage: I removed the gem entirely from my project; i may return and have another attempt at it in the future.
Hi folks
I'm getting two errors:
I have no idea what this means.
here is my application.js file:
//= require jquery //= require jquery.turbolinks //= require jquery_ujs //= require dataTables/jquery.dataTables //= require turbolinks //= require select2 //= require_tree .
Here is form:
It's just not working for me. Those two errors are showing on firebug and I don't know how to proceeed. is it a bug or something i'm doing wrong on my end?