neo4jrb / activegraph

An active model wrapper for the Neo4j Graph Database for Ruby.
http://neo4jrb.io
MIT License
1.4k stars 276 forks source link

undefined method `neo4j' for #<Rails::Application::Configuration:0x00000271c086cf98 #1700

Open jacobfranco opened 1 year ago

jacobfranco commented 1 year ago

I am attempting to follow the instructions from documentation here: http://neo4jrb.io/#getting-started

I added these gems and ran bundle install

gem 'activegraph'
gem 'neo4j-ruby-driver'

and in my config/application.rb I have:

config.neo4j.driver.url = ENV['NEO4J_URL'] || 'neo4j://localhost:7687'
    config.neo4j.driver.username = 'neo4j'
    config.neo4j.driver.password = '<my password>'

My error message is:

C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/railtie/configuration.rb:96:inmethod_missing': undefined method neo4j' for #<Rails::Application::Configuration:0x00000271c086cf98

coming from my config/application.rb, specifically on this line:

config.neo4j.driver.url = ENV['NEO4J_URL'] || 'neo4j://localhost:7687'

I attempted to use the 'neo4j' gem and to add a require 'activegraph/railtie' in my application.rb but that did not solve the problem. I also added my neo4j information in a config/neo4j.yml file, and that did not work either.

When I set up my project, I made it in API only mode and skipped ActiveRecord setup

Runtime information:

neo4j (9.6.2) neo4j-core (9.0.0) neo4j-rake_tasks (0.7.19) neo4j-ruby-driver (4.4.4) activegraph (11.3.1)

wmene commented 9 months ago

We're seeing this error occasionally too