David Silva Smith
David Silva Smith

Reputation: 11716

How do I use Rails Selectize in my Rails Project?

I'm getting the error

Selectize: Dependency MicroPlugin is missing

Make sure you either: (1) are using the "standalone" version of Selectize, or (2) require MicroPlugin before you load Selectize.

application.js:

//= require jquery
//= require jquery_ujs
//= require selectize
//= require turbolinks
//= require bootstrap-sprockets
//= require jquery.validate
//= require jquery.validate.additional-methods
//= require_tree .

Upvotes: 3

Views: 3171

Answers (1)

David Silva Smith
David Silva Smith

Reputation: 11716

I changed my application.js to

//= require selectize/standalone/selectize

I figured it out by looking at the load paths

~/.rvm/gems/ruby-2.3.1/gems/rails-assets-selectize-0.12.3/app/assets/javascripts

and found standalone was in /selectize/standalone/selectize.js

I knew to look there by looking at their examples.

Upvotes: 7

Related Questions