阅读背景:

Neo4j—如何设置DEV ENV指向AWS数据库。

来源:互联网 

I created a new app in Rails using:

我在Rails中创建了一个新的应用程序:

rails new myapp -m https://neo4jrb.io/neo4j/neo4j.rb -O

rails新myapp -m https://neo4jrb.io/neo4j/neo4j。rb - o

I did not executed the command:

我没有执行命令:

rake neo4j:install[community-2.2.0,development]

rake neo4j:安装(community-2.2.0、发展)

since my database is already created, populated and hosted by an AWS server.

因为我的数据库已经创建,由AWS服务器填充和托管。

How I can set my Rails dev env to use the database on the AWS server?

如何设置我的Rails dev env在AWS服务器上使用数据库?

When running the command from my local computer myapp folder

从本地计算机myapp文件夹运行命令。

$ rails s -d

rails s - d美元

I am getting the error:

我得到了错误:

Expected response code 200 Error for request https://my-aws-server.com:7474/db/data/, 401, 401 (Neo4j::Server::Resource::ServerException)

请求的响应代码200错误请求https://ms -aws-server.com:7474/db/data/, 401, 401 (Neo4j::服务器::ServerException)

1 个解决方案

#1


0  

I added these three lines in the file config/environments/development.rb:

我在文件配置/环境/开发中添加了这三行代码。

  config.neo4j.session_options = { basic_auth: { username: 'neo4j_user', password: 'neo4j_pass'} }
  config.neo4j.session_type = :server_db
  config.neo4j.session_path = 'https://my-aws-server.com:7474'

Problem solved.

问题解决了。


分享到: