Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
John LeBoeuf-Little (he/him)
@worldnamer_twitter
Hello!
I'm having trouble getting neo4j.rb working on my local install and thought this might be the place to ask questions.
Heinrich Klobuczek
@klobuczek
asking never hurts
John LeBoeuf-Little (he/him)
@worldnamer_twitter
Right, thank you. :) My issue is with using neo4j-core.
Specifically, I'm using the HTTP adapter to create a session, and execute a simple query.
This is running on jruby-head.
Heinrich Klobuczek
@klobuczek
any reason for using such an old version?
John LeBoeuf-Little (he/him)
@worldnamer_twitter
I get a deprecation warning ActiveSupport::PerThreadRegistry is deprecated and will be removed in Rails 7.1
I also get ArgumentError: `debug': wrong number of arguments (given 1, expected 0)
Oh
Uh
Ignorance?
Heinrich Klobuczek
@klobuczek
neo4j has been superseeded by activegraph
John LeBoeuf-Little (he/him)
@worldnamer_twitter
I seeeeee
I'm really just trying to connect to neo4j in any sort of base ruby environment
Well, that's maybe incorrect: in a non-Rails environment.
So would you suggest trying activegraph with the ruby driver?
(I was unable to get the "native" ruby driver working, because it looks like maybe seabolt is abandoned now?)
Heinrich Klobuczek
@klobuczek
and if you are using jruby you are lucky, you can either use activegraph 11 or the neo4j-java-driver gem 4.4.0
John LeBoeuf-Little (he/him)
@worldnamer_twitter
I am using jruby. I didn't have any luck with the neo4j-java-driver gem.
Heinrich Klobuczek
@klobuczek
in non rails definitely the driver directly
John LeBoeuf-Little (he/him)
@worldnamer_twitter
Got it. I'll try that. The problem I had was not finding the gem.
Fetching gem metadata from https://rubygems.org/......... Could not find gem 'neo4j-java-driver' in any of the gem sources listed in your Gemfile.
Heinrich Klobuczek
@klobuczek
well that’s nothing related to the gem itself
it is a gem you can install only on jruby
John LeBoeuf-Little (he/him)
@worldnamer_twitter
I presume you are correct. I don't know what to do to fix it - my Gemfile is pointed at rubygems and my file uses gem 'neo4j-java-driver'
I feel like I'm missing something obvious.
Heinrich Klobuczek
@klobuczek
BTW we are not testing the gems against jruby-head, only against latest release
John LeBoeuf-Little (he/him)
@worldnamer_twitter
Ah, so that would be 9.2
Good to know. Do you think that would affect the bundle install?
I'll run an index on bundle
John LeBoeuf-Little (he/him)
@worldnamer_twitter
Aha, figured it out - I needed to nuke my Gemfile.lock
Heinrich Klobuczek
@klobuczek
9.3.4.0 is the latest jruby release, we tested 9.3.3.0
John LeBoeuf-Little (he/him)
@worldnamer_twitter
Okay, thank you for that. I'm almost working; do you know off-hand what require statement I would need to use to invoke the Neo4j module?
Heinrich Klobuczek
@klobuczek
??? What gem and version did you end up using?
John LeBoeuf-Little (he/him)
@worldnamer_twitter
Currently 4.4 for the driver
I'm still on jruby-head for the rvm but will drop down if it explodes
I'm running something equivalent to bundle exec ruby test.rb, but it's just upset at the line where I do Neo4j::Driver::GraphDatabase...
NameError: uninitialized constant Neo4j
John LeBoeuf-Little (he/him)
@worldnamer_twitter
The final require seems to be require 'neo4j_ruby_driver' but it DID require me to move to a previous version of jruby.
John LeBoeuf-Little (he/him)
@worldnamer_twitter
That said, things are working! Thank you so much for your help :)
dimitriwoei
@dimitriwoei
image.png
dimitriwoei
@dimitriwoei
@klobuczek Hi, is this still on track? https://neo4j-aura.canny.io/feature-requests/p/official-ruby-driver We are currently contemplating whether we should port our application to JRuby (and find solutions for missing gems), stay on Ruby (we use gems not compatible with JRuby) or move to Python (to have official driver, although neomodel is nowhere near as good as activegraph)
3 replies
archit dugar
@dugararchit_twitter

I have upgraded my neo4j db from 3.x.x to 4.0.12 as of now, after running rails application, and keeping same config in development.rb getting

using rails 5.2.3, ruby 2.5.3,

and gem -- gem 'neo4j', '9.5.2'

configuration in development.rb
config.neo4j.session.type = :http

config.neo4j.session.path = 'http://neo4j:neo4j@localhost:7979'

Getting below error
Neo4j::Core::CypherSession::ConnectionFailedError (Connection failure:
status: 404

):

Heinrich Klobuczek
@klobuczek
neo4j gem dooes not support neo4j >= 4, please use activegraph gem
archit dugar
@dugararchit_twitter
so should I uninstall neo4j and install only activegraph, is it
any doc page, available ?
rfurtad
@rfurtad
How can I improve query performance that filter nodes based on relationship properties? Neo4j 4.3 has a new feature that we can index relationship attributes, but 4.0 does not has this. Any tips?