Issue using Chosen with Jammit for Ruby on Rails

Aug 29, 2011 by     No Comments    Posted under: Ruby On Rails

I’m mainly writing this to help others that accidentally might run into this issue (since it took me a few hours to actually resolve this issue…).

If you happen to use the awesome Chosen-plugin for jQuery in combination with the asset packaging gem Jammit for Ruby on Rails – be sure to not include the minified version of Chosen in your config/assets.yml-file.

It took me a good amount of time to actually pin point what was going on since a lot of my javascript just stopped working (ajax forms not firing, other jQuery-plugins not loading etc). So, just to make it super-duper clear — include chosen.jquery.js AND NOT chosen.jquery.min.js in your assets.yml-file to prevent this issue from happening.

Got anything to say? Go ahead and leave a comment!