来自文档: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?在对设置进行剪切和粘贴时,我会不断出现无证错误。
答案 0 :(得分:1)
感谢您指出丢失的require
。我刚刚添加了它(如果您发现其他任何内容,也可以随意点击顶部的“在GitHub上编辑”以启动拉取请求)
你做过require "neo4j"
吗?这应该带来ActiveBase
和所有ActiveNode
/ ActiveRel
内容。如果可行,我也可以将其添加到文档中