Skip to content

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

@jacobfranco

Description

@jacobfranco

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:in method_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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions