如何在我的 Rails 项目中使用 Rails Selectize?

How do I use Rails Selectize in my Rails Project?

我遇到了错误

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 .

我把我的 application.js 改成

//= require selectize/standalone/selectize

我通过查看加载路径弄明白了

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

并发现独立版位于 /selectize/standalone/selectize.js

我通过查看 their examples 就知道该去那里了。