问题
Any clue how to fix this?
rails s -d
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
/Users/levi/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/neo4j-core-4.0.5/lib/neo4j-server/resource.rb:33:in `handle_response_error': Expected response code 200 Error for request http://localhost:7474/db/data/, 401, 401 (Neo4j::Server::Resource::ServerException)
from /Users/levi/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/neo4j-core-4.0.5/lib/neo4j-server/resource.rb:37:in `expect_response_code'
回答1:
Assuming you installed Neo4j using the rake install neo4j
task, make sure the server has started by pointing a web browser to http://localhost:7474
. If it isn't running, you'll want to troubleshoot issues related to a server failing to start.
If you downloaded Neo4j 2.2.0 from neo4j.com or used brew within the last day or two, you'll need to go to that admin page once to change the password, then set it in the app, OR you can disable auth entirely as described at How to disable Basic Auth on Neo4j 2.2.0-RC01. I always disable auth in Neo4j 2.2.0 in my test and dev environments.
回答2:
For me that was only part of the problem. I had also installed neo4j onto my machine using brew install before I installed the gem. When I was trying to start the server, it was trying to start the server from the brew installation, from inside the Cellar. I had edited the config, as described above, in the install in my project that I produced by following the neo4j install instructions. So it wasn't working.
Only when I brew uninstalled neo4j, and executed ./neo4j start_ from the bin folder, did it all work properly for me.
来源:https://stackoverflow.com/questions/29284709/cannot-start-rails-server-with-neo4j-db-response-coed-401-instead-of-200