activegraph
activegraph copied to clipboard
Minor documentation issue, exclusivity of configuration
To use the seabolt adapter with neo4jrb, on Rails, one needs to add the line
config.neo4j.session.options = {
adaptor_class: Neo4j::Core::CypherSession::Adaptors::Driver
}
to config/application.rb
; but it seems that doing-so means that all configuration is expected to be
there, neo4j.yml
is no-longer inspected for configuration. A typical RSpec error is then
Failure/Error:
Neo4j::ActiveBase.run_transaction do |tx|
example.run
tx.mark_failed
end
ArgumentError:
Invalid URL: "http://localhost:7474"
even though my config/neo4j.rb
specifies
test:
type: bolt
url: bolt://localhost:7572
I discovered this exclusivity by running strace -f
on my bundle exec rake rspec ...
and noting that there is no stat
of the neo4j.yml
when the application.rb
lines are present, but it appears when they are commented out :smile:
Just moving all of my configuration into application.rb
and environment/*.rb
fixed the problem.
So could I suggest: just a sentence stating that the configuration is exclusive in the documentation, that would have saved me a morning of head-scratching.
Additional information which could be helpful if relevant to your issue:
Runtime information:
Neo4j database version: 3.4.1
neo4j
gem version: 9.6.1
neo4j-core
gem version: 9.0.0