neo4jrb / neo4j-ruby-driver

Neo4j Ruby Driver
MIT License
38 stars 28 forks source link

LoadError: cannot load such file -- neo4j-ruby-driver #224

Closed ag-TJNII closed 1 year ago

ag-TJNII commented 1 year ago

This might be user error but if it is I'm just not seeing it:

Gemfile:

source 'https://rubygems.org'

gem 'neo4j-ruby-driver', '~> 4.4'

gem 'pry'

The gem is installed:

$ gem list | grep -i neo
neo4j-ruby-driver (4.4.1)

But when I try and require it I get load errors:

$ bundle exec pry
[1] pry(main)> require 'neo4j-ruby-driver'
LoadError: cannot load such file -- neo4j-ruby-driver
from (pry):1:in `require'
[2] pry(main)>

I see the gem name is neo4j-ruby-driver in the Gemspec:

$ grep -a name ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/specifications/neo4j-ruby-driver-4.4.1.gemspec
  s.name = "neo4j-ruby-driver".freeze

Am I overlooking something obvious here?

klobuczek commented 1 year ago

sorry, we cannot provide that level of support, too many moving parts

ag-TJNII commented 1 year ago

For anyone else it looks like this gem is not meant to be used directly, but is instead is meant to be a dependency of activegraph: https://neo4jrb.readthedocs.io/en/stable/index.html

mrhardikjoshi commented 1 year ago

Requiring with following syntax should work.

% irb
irb(main):001:0> require 'neo4j_ruby_driver'
=> true
klobuczek commented 1 year ago

@mrhardikjoshi Thank you and @ag-TJNII sorry for dismissing your issue so quickly. There is indeed a way to not only

require 'neo4j_ruby_driver'

but as well by

require 'neo4j-ruby-driver'

and

require 'neo4j/driver'

The last one will become the recommended way but all alternatives will remain for some time. PR in progress.