3

When I put the following in my gemfile:

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'

It results in this:

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)

Any ideas on getting these gems to work?

2
  • I just got unanswer on my post and I am not sure why as it includes all facts: (1) gem does not have production-ready solution for Rails 5. (2) you can use experimental branch as suggested in provided link. Newer post has been marked as the answer, but it provides the same solution (using experimental branch) without the notice that it is still WIP. @bevanb could you clarify the reason? Commented Sep 26, 2016 at 10:09
  • @smefju Sorry for the late response- I got the issue resolved using the other solution. Cheers! Commented Dec 13, 2016 at 21:19

2 Answers 2

5

You can use client_side_validations with Rails 5 by specifying the branch like this:

gem 'client_side_validations', 
    github: 'DavyJonesLocker/client_side_validations', 
    branch: 'rails5'

And if using Simple Form:

gem 'client_side_validations-simple_form', 
    github: 'DavyJonesLocker/client_side_validations-simple_form', 
    branch: 'rails5'
Sign up to request clarification or add additional context in comments.

Comments

2

Rails 5 support is not ready for the client_side_validations gem. Take a look at this issue #645. You can try experimental branch as suggested in the issue's comment.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.