2
votes

I have installed jruby and trying to use Neo4j for my Rails app. But typing bundle install gives me the following conflict.

Bundler could not find compatible versions for gem "railties": In Gemfile: neo4j (>= 2.2.3) java depends on railties (< 3.3, >= 3.0.0) java

rails (= 4.0.0) java depends on railties (4.0.0)

Here's my gemfile:

source 'https://rubygems.org'

gem 'rails', '4.0.0'
gem 'sass-rails'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails'
gem 'therubyrhino'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'

group :doc do
  gem 'sdoc', require: false
end
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'unicorn'
gem 'capistrano', group: :development

group :development, :test do
  gem "rspec-rails"
end

gem "neo4j", ">= 2.2.3"

Should I remove my Gemfile.lock and run bundle update? Thanks!

2

2 Answers

3
votes

That says that the currently available version of neo4j require a version of railties < 3.3, but rails 4.0.0 requires version 4.0.0 of railties: bundler cannot resolve this conflict.

The only way out of this is for neo4j to be updated to work with rails 4.0. It is entirely possible that neo4j's version constraint on railties is a precaution only - there may be nothing more to do than checking that everything still works under 4.0.

5
votes

There is a branch for rails 4 in the neo4j project, so you can just specify it in Gemfile:

gem 'neo4j', git: 'git://github.com/andreasronge/neo4j.git', branch: 'rails4'