I've set up a very basic Rails/Neo4j application to play around with following something like the example instructions from http://neo4jrb.readthedocs.io/en/8.1.x/Setup.html, i.e.
rails new myapp -m http://neo4jrb.io/neo4j/neo4j.rb -O
cd myapp
rake neo4j:install[community-latest]
rake neo4j:start
rails generate scaffold User name:string email:string
rake neo4j:migrate
Then in a Rails console:
user = User.new(:name => 'Bob', :email => 'bob@bob.com')
user.save
User.count
HTTP REQUEST: 12ms GET http://localhost:7474/db/data/schema/constraint (0 bytes)
HTTP REQUEST: 3ms GET http://localhost:7474/db/data/schema/index (0 bytes)
CYPHER
MATCH (n:`User`)
RETURN count(n) AS count
HTTP REQUEST: 110ms POST http://localhost:7474/db/data/transaction/commit (1 bytes)
=> 1
This all looks fine and http://localhost:3000/users shows the new user as expected. But, if I go to http://localhost:7474 there's no sign of anything; Neo4j informs me that there are no labels or relationships in the database. Can anyone suggest what might be going on here?
答案 0 :(得分:0)
我不知道为什么,但似乎使用localhost:7474(在Safari中)会产生上面讨论的问题,而127.0.0.1:7474则没问题。我最近运行的其他所有东西(例如SOLR,Rails,Django)都适用于localhost。