我在Rails 5中遇到以下错误。当我点击通过ActiveAdmin创建新用户按钮时,它会引发此错误,仅供参考,用户表具有“国家/地区”字段,并且我使用了gem'country-select'的Gemfile。Rails 5中是否支持国家选择的宝石?
wrong number of arguments (given 4, expected 0)
我在Rails 5中遇到以下错误。当我点击通过ActiveAdmin创建新用户按钮时,它会引发此错误,仅供参考,用户表具有“国家/地区”字段,并且我使用了gem'country-select'的Gemfile。Rails 5中是否支持国家选择的宝石?
wrong number of arguments (given 4, expected 0)
我只是通过改变宝石解决它。我在我的Gemfile中将gem 'country-select'
替换为gem 'country_select'
。
现在可以正常工作。
看起来像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
感谢您的回应&提示@ABPrime –