0

我正在学习使用 neo4jrb 项目将 Neo4j 与 Rails 一起使用: https ://github.com/neo4jrb/neo4j/wiki/Neo4j-v3-Setup#usage-from-rails

按照说明我做了

rails new testdb_app -m http://neo4jrb.io/neo4j/neo4j.rb -O

因为我已经在我的 ubuntu 机器上安装了我的 neo4j 服务器,所以我没有使用 rake 任务来启动服务器。

我像这样在 application.rb 中设置了正确的用户名和密码

config.neo4j.session_options = { basic_auth: { username: 'neo4j', password: '******'} } 
config.neo4j.session_type = :server_db 
config.neo4j.session_path = 'http://localhost:7474'

但是当我这样做时:

rails 生成脚手架用户名:字符串电子邮件:字符串

它在以下位置引发错误:neo4j-core-5.1.6/lib/neo4j-server/cypher_session.rb:51:in `open': Server not available on http://localhost:7474 (response code 403) (RuntimeError)

但是我通过访问 url: http://localhost:7474检查了服务器是否正在运行,并且我可以使用用户名和密码登录。

我做错了什么,是否存在问题,因为我在代理服务器后面(我确实设置了我的 bash 代理环境变量)。

4

0 回答 0