I get this error “LocalJumpError (no block given)” any time when I paste this row of code to my index function in rails controller:
result = Neo4j.query("START n=node(0) RETURN n")
So the function looks like (function has no objective, it’s only for testing purposes of Neo4j.query)
def index
@posts = Post.all
result = Neo4j.query("START n=node(0) RETURN n")
respond_to do |format|
format.html # index.html.erb
format.json { render json @posts }
end
end
Neo4j.query should return just “enumerable of hash values” as stands in its documentation (Neo4j.query documentation)
The error LocalJumpError (no block given) occurs with jruby v. 1.7, with jruby v. 1.6.2 error changes to ArgumentError (block not supplied)
I have found myself using an old documentation for neo4j.rb by mistake. Documentation for v. 2 is at https://github.com/andreasronge/neo4j/wiki