3

我收到错误

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.

应用程序.js:

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

1 回答 1

7

我将 application.js 更改为

//= require selectize/standalone/selectize

我通过查看加载路径弄清楚了

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

发现standalone在/selectize/standalone/selectize.js

我知道通过看他们的例子来看看那里。

于 2016-09-18T10:46:39.650 回答