3
我想部署一個使用Neo4jrb的Rails應用程序來生產Capistrano。在部署過程中出現以下錯誤顯示出來:Neo4j,Capistrano部署,身份驗證錯誤
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 [email protected]
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'
...
我設置neo4.yml
以下憑據:
production:
type: server_db
url: http://username:[email protected]:7474
,也試過:
production:
type: server_db
url: http://localhost:7474
username: username
password: password
我成立了這個證書與Neo4j的REST Api,當我在服務器上運行curl
一切看起來都很好:
curl http://username:[email protected]:7474/db/data/
那麼,爲什麼在部署過程中出現錯誤?
哪個任務試圖連接到數據庫? –
它似乎是'rake資產:預編譯',但我不會爲了......爲什麼......不用支持...... – LimonChillo
'assets:precompile'需要加載Rails環境,它將使用'neo4j' gem中的'railtie',它打開在Rails應用程序初始化的時候會話到Neo4j。 –