2

从文档: http: //neo4jrb.readthedocs.io/en/8.0.x/Setup.html

neo4j_adaptor = Neo4j::Core::CypherSession::Adaptors::HTTP.new('http://user:pass@host:7474') Neo4j::ActiveBase.on_establish_session { Neo4j::Core::CypherSession.new(neo4j_adaptor) }

我得到:

NameError: uninitialized constant Neo4j::Core::CypherSession

为了解决这个问题,我添加了(上面没有记录):

require 'neo4j/core/cypher_session/adaptors/http'

错误更改(第一行有效):

Neo4j::ActiveBase.on_establish_session { Neo4j::Core::CypherSession.new(neo4j_adaptor) } NameError: uninitialized constant Neo4j::ActiveBase

有没有更好的地方可以了解如何设置使用基于 heroku 的 grapheneDB?在进行设置的剪切和粘贴时,我不断遇到未记录的错误。

4

1 回答 1

1

感谢您指出丢失的require. 我刚刚添加了它(如果您发现其他任何内容,也可以随时单击顶部的“在 GitHub 上编辑”以启动拉取请求)

你做过require "neo4j"吗?这应该带来ActiveBase所有ActiveNode/的ActiveRel东西。如果可行,我也可以将其添加到文档中

于 2017-04-23T12:30:21.937 回答