0

I'm using Rails and Neo4j.rb to build a REST API and I need to paginate some responses. First of all, I tried with neo4j-will_paginate gem but I got the following error when I executed bundle install:

Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
    neo4j-will_paginate (>= 0) ruby depends on
      activesupport (~> 3.0) ruby

    devise-neo4j (~> 2.0.0.alpha.1) ruby depends on
      neo4j (>= 3.0.0.alpha.6) ruby depends on
        activesupport (4.0.0)

Bundler could not find compatible versions for gem "neo4j":
  In Gemfile:
    neo4j (~> 3.0.0) ruby

    devise-neo4j (~> 2.0.0.alpha.1) ruby depends on
      neo4j (3.0.0.alpha.6)

How I can fix it without removing one of the dependencies?

Besides that, what's the proper way to include pagination: headers or rendered in JSON? Taking into account that I'm going to consume the response in a Ember app, what approach fits better?

Best regards!

tehAnswer
  • 960
  • 1
  • 13
  • 28

1 Answers1

2

First I think you should use the 3.0.x version of the gem (not the release candidate) as it's been out of rc for a while and there are a number of patches that have been applied.

Secondly, we made a separate neo4j-will_paginate gem because we weren't able to get access to the original on rubygems:

https://github.com/neo4jrb/neo4j-will_paginate_redux

That might help

Brian Underwood
  • 10,746
  • 1
  • 22
  • 34