当我把以下内容放在我的gemfile中时: gem 'simple_form'gem 'client_side_validations'#, github: 'DavyJonesLocker/client_side_validations'gem 'client_side_validations-simple_form'#, github: 'DavyJonesLocker/client_side_validations
gem 'simple_form' gem 'client_side_validations'#, github: 'DavyJonesLocker/client_side_validations' gem 'client_side_validations-simple_form'#, github: 'DavyJonesLocker/client_side_validations-simple_form'
结果如下:
Bundler could not find compatible versions for gem "rails": In Gemfile: rails (= 5.0.0) client_side_validations-simple_form was resolved to 3.2.0, which depends on client_side_validations (~> 4.2.0) was resolved to 4.2.0, which depends on rails (< 4.3.0, >= 4.0.0)
让这些宝石发挥作用的任何想法?
您可以通过指定分支来使用带有Rails 5的client_side_validations:gem 'client_side_validations', github: 'DavyJonesLocker/client_side_validations', branch: 'rails5'
如果使用简单形式:
gem 'client_side_validations-simple_form', github: 'DavyJonesLocker/client_side_validations-simple_form', branch: 'rails5'