I want to deploy a Rails application, using Neo4jrb, to production with Capistrano. During deployment the following error shows up:
DEBUG [5a528d81] Finished in 0.057 seconds with exit status 0 (successful).
INFO [acd66fd5] Running /usr/local/bin/chruby-exec 2.3.0 -- bundle exec rake assets:precompile as deploy@46.101.153.252
DEBUG [acd66fd5] Command: cd /home/deploy/projects/larp-tool/releases/20160522103925 && ( export RAILS_ENV="production" ; /usr/local/bin/chruby-exec 2.3.0 -- bundle exec rake assets:precompile )
DEBUG [acd66fd5] rake aborted!
DEBUG [acd66fd5] Neo4j::Server::Resource::ServerException: Expected response code 200 Error for request http://localhost:7474/db/data/, 401
DEBUG [acd66fd5] /home/deploy/projects/larp-tool/shared/bundle/ruby/2.3.0/gems/neo4j-core-6.1.4/lib/neo4j-server/resource.rb:37:in `handle_response_error!'
/home/deploy/projects/larp-tool/shared/bundle/ruby/2.3.0/gems/neo4j-core-6.1.4/lib/neo4j-server/resource.rb:32:in `expect_response_code!'
/home/deploy/projects/larp-tool/shared/bundle/ruby/2.3.0/gems/neo4j-core-6.1.4/lib/neo4j-server/cypher_session.rb:86:in `initialize_resource'
...
I set the following credentials in neo4.yml
:
production:
type: server_db
url: http://username:password@localhost:7474
and also tried:
production:
type: server_db
url: http://localhost:7474
username: username
password: password
I set up this credentials with the Neo4j REST Api, and when I run curl
on the server everything seems fine:
curl http://username:password@localhost:7474/db/data/
So, why is there an error during deployment?