LDB
LDB

Reputation: 692

Neo4j - How to set DEV ENV to point to an AWS database

I created a new app in Rails using:

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

I did not executed the command:

rake neo4j:install[community-2.2.0,development]

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

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

When running the command from my local computer myapp folder

$ rails s -d

I am getting the error:

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

Upvotes: 0

Views: 85

Answers (1)

LDB
LDB

Reputation: 692

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 = 'http://my-aws-server.com:7474'

Problem solved.

Upvotes: 0

Related Questions