I've got a Rails app up and running using Neo4j, with a very basic two-node 
data model implemented as Rails models using the neo4j gem, running on a 
Ubuntu VM in VirtualBox on Windows 7. Through manual inspection, everything 
is working fine; controllers can create entries in the database that are 
visible via Neo4j's browser console.

However, Rails's automated testing cannot run. When I run

rake test

It fails with this error message:

rake aborted!NameError: uninitialized constant 
Neo4j::Session/var/lib/gems/1.9.1/gems/neo4j-5.2.3/lib/neo4j/railtie.rb:69:in 
`open_neo4j_session'

Followed by a very long trace. When I open the Rails console, 
Neo4j::Session does appear to be defined. Here is my sequence of events:

rails consoleLoading development environment (Rails 4.2.4)
irb(main):001:0> Neo4j::Session=> Neo4j::Session available: [:server_db]

However, if I try to open a Rails console in test environment with 

rails console test

It fails with the same NameError as above. The same thing happens if I try 
to open a console in production. What is going wrong here? Why can 
environments other than development not see Neo4j?

I have written no code in the generated test files; I am simply trying to 
get the rake task to run so I can.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to