Rails 5 是否支持 country-select gem?

Is there support for country-select gem in Rails 5?

我在 Rails 5 中收到以下错误。当我通过 ActiveAdmin 单击创建新用户按钮并抛出此错误时,仅供参考,用户 table 具有字段 'country'我在我的 Gemfile 中使用了 gem 'country-select'。

wrong number of arguments (given 4, expected 0)

看起来 country_select 提供对 rails5 的支持。我安装了 rails5 并执行了测试套件,所有规格都通过了。

Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 45263
...................

Finished in 1.87 seconds (files took 0.94449 seconds to load)
19 examples, 0 failures

Randomized with seed 45263

可能是你的语法有误usage

我刚刚通过更改 gem 解决了它。我在我的 Gemfile 中用 gem 'country_select' 替换了 gem 'country-select'

这现在工作正常。