O'Reilly logo

Neo4j Cookbook by Ankur Goel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accessing the embedded Neo4j from Ruby

Many modern web apps are built on Ruby and Rails, so it is important to learn how to access Neo4j embedded using Ruby.

Getting ready

Andreas Ronge has written the Ruby bindings in JRuby, which utilizes the neo4j Java library underneath it. It can be embedded into an existing Rails application very easily.

This project can be accessed at https://github.com/neo4jrb/neo4j-core.

This project comes with an excellent documentation on how to use it with the Rail application.

How to do it...

Install gem neo4j-core on the machine, using the gem install neo4j-core command.

The complete documentation has been provided at https://github.com/neo4jrb/neo4j-core/wiki.

One sample example of creating nodes and relationships is shown ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required