Skip to content

NoMethodError (undefined method `to_sym' for nil:NilClass) when fetching Node #1663

@michalkorzawski

Description

@michalkorzawski

Hi

I have an issue with fetching data - all operation like Model.first, Model.last, Model.find_by(name: 'some name') ends up with error NoMethodError (undefined method `to_sym' for nil:NilClass)

BUT when I copy/paste ActiveGraph::Core::Schema from activegraph source code to my app and in application.rb I'm loading this code like this:

overrides = "#{Rails.root}/app/services/active_graph"

Rails.autoloaders.main.ignore(overrides)

config.to_prepare do
  Dir.glob("#{overrides}/**/*.rb").each do |override|
    load override
  end
end

everything is working fine

label(keys, row) from below's method is causing this error (only then I'm not including this code in my rails app)

def indexes
        raw_indexes do |keys, result|
          result.map do |row|
            { type: row[:type].to_sym, label: label(keys, row), properties: properties(row), state: row[:state].to_sym }
          end
        end
      end
gem 'activegraph', '~> 10.1'
gem 'neo4j-ruby-driver', '~> 1.7', '>= 1.7.5'

I run neo4j db as a docker image

Do you know why could it be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions