In this recipe, we will learn how to access the Neo4j graph database server from Ruby using the REST bindings.
The Neo4j REST server can be accessed using an excellent neography
gem
module, which claims to be a thin wrapper over the Neo4j REST API interface.
The following steps will get you started with neography
gem
:
The
neography
gem
modules can be installed on the machine using thegem install
command:gem install 'neography'
The
neography
module also requires thegem
module in the Ruby code, so configure and initialize theneography
gem
modules with the following code:@graph = Neography::Rest.new({ :protocol => 'http://', :server => IP_ADDRESS, :port => PORT, })