Thank you Andreas,
A nice Xmas gem!

/peter

(snt)-[:frm]->(phn)
On Dec 22, 2013 11:03 PM, "Andreas Ronge" <[email protected]> wrote:

> Hi
>
> I've released the Ruby/JRuby wrapper for Neo4j which uses Neo4j 2.0.0.
>
> Here is a simple example how to use it using the Neo4j Server.
>
> Install the neo4j-core 3.0.0.alpha.2 release.
> Type the following in a terminal:
>
>   gem install neo4j-core --pre
>
> Create a Rakefile with the following line:
>
>   require 'neo4j/tasks/neo4j_server'
>
> Install and start neo4j, type the following in a terminal:
>
>   rake neo4j:install[community-2.0.0]
>   rake neo4j:start
>
> Open a IRB/Pry terminal and play with the new API
> $ irb
> 2.0.0-p247 :001 > require 'neo4j-core'
> 2.0.0-p247 :002 > Neo4j::Session.open(:server_db, "http://localhost:7474";)
> 2.0.0-p247 :003 > a = Neo4j::Node.create(name: 'andreas')
> 2.0.0-p247 :004 > b = Neo4j::Node.create({name: 'jimmy'}, :person)  #
> create with a label
> 2.0.0-p247 :005 > b.labels
>  => [:person]
>
> If you are using JRuby it's even easier since the embedded database comes
> included (in the neo4j-community gem) - no need to install it with Rake.
> Here is the same example, but using the Embedded API:
>
> jruby-1.7.4 :001 > require 'neo4j-core'
> jruby-1.7.4 :002 > Neo4j::Session.open(:embedded_db, 'mydatabase_folder')
> jruby-1.7.4 :004 > Neo4j::Session.current.start
> jruby-1.7.4 :005 > a = Neo4j::Node.create(name: 'andreas')
> jruby-1.7.4 :006 > b = Neo4j::Node.create({name: 'jimmy'}, :person)
> jruby-1.7.4 :007 > b.labels
>  => [:person]
>
> Notice the only difference between Neo4j server and Neo4j embedded is how
> the session is created.
>
> For more info, see https://github.com/andreasronge/neo4j-core
>
> merry christmas
>
> /Andreas
>
> --
> You received this message because you are subscribed to the Google Groups
> "neo4jrb" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/neo4jrb.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.

Reply via email to