Rails 5中是否支持country-select gem?

时间:2016-11-29 13:58:43

标签: ruby-on-rails-5

我在Rails 5中收到以下错误。当我点击通过ActiveAdmin创建新用户按钮并且它抛出此错误时,FYI,用户表有字段'country'并且我使用过,gem'country-select'in我的Gemfile。

wrong number of arguments (given 4, expected 0)

2 个答案:

答案 0 :(得分:1)

看起来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

答案 1 :(得分:1)

我刚刚通过改变宝石来解决它。我在我的Gemfile中将gem 'country-select'替换为gem 'country_select'

现在效果很好。