Neo4j.rb release 0.3.3

7 views
Skip to first unread message

Andreas Ronge

unread,
Nov 25, 2009, 3:49:24 PM11/25/09
to neo...@googlegroups.com
Hi

I've just released Neo4j.rb 0.3.3
The big news are support for cascade delete, counter property (for
has_list) and support for all lucene Analyzers.

The aggregation extension is still experimental - it's like a DSL for
creating custom indexes which can be used for
creating spatial indexing, grouping and counting, etc. There are two
types of aggregates: property and node aggregates.

The next version will be 0.4.0 since I think it will introduce breaking changes.
The database has to be migrated and maybe the api will change. Btw,
what would you like to see in the next release ?

The updated 0.3.3 RDocs - http://neo4j.rubyforge.org/
The new version is available from rubyforge (jruby -S gem install neo4j)

Changelog
=========
* Support for a counter property on has_lists (#75)
* Support for Cascade delete. On has_n, had_one and has_list (#81)
* NodeMixin#all should work with inheritance - Child classes should
have a relationship of their own. (#64) - Thanks Johny Ho !
* Support for other lucene analyzer then StandardAnalyzer (#87)
* NodeMixin initialize should accept block like docs (#82)
* Add incoming relationship should work as expected:
n1.relationships.incoming(:foo) << n2 (#80)
* Delete node from a has_list relationship should work as expected (#79)
* Improve stacktraces (#94)
* Removed sideeffect of rspecs (#90)
* Add debug method on NodeMixin to print it self (#88)
* Removed to_a method (#73) - Thanks Carlo Cabanilla !
* Upgrade to neo4j-1.0b10 (#95)
* Upgrade to lucene 2.9.0 (#83)
* Refactoring: RSpecs (#74)
* Refactoring: aggregate each, renamed to property aggregator (#72)
* BugFix: neo4j gem cannot be built from the source (#86)
* BugFix: Neo4j::relationship should not raise Exception if there are
no relationships (#78)

Happy Coding !

/Andreas

Peter Neubauer

unread,
Nov 26, 2009, 7:19:26 AM11/26/09
to neo4jrb
Great work Andreas!

/peter neubauer

COO and Sales, Neo Technology

GTalk: neubauer.peter
Skype peter.neubauer
Phone +46 704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter http://twitter.com/peterneubauer

http://www.neo4j.org - Relationships count.
http://www.linkedprocess.org - Distributed computing on LinkedData scale
> --
>
> You received this message because you are subscribed to the Google Groups "neo4jrb" group.
> To post to this group, send email to neo...@googlegroups.com.
> To unsubscribe from this group, send email to neo4jrb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/neo4jrb?hl=en.
>
>
>

Bert Fitié

unread,
Nov 27, 2009, 2:51:06 AM11/27/09
to neo...@googlegroups.com
Hi,

(1)

After installing 0.3.3 I got the following error using my railnet:

finix2:rb $> jirb -railnet
/opt/local/share/java/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require': no such file to load -- neo4j/jars/shell-1.0-b10 (LoadError)
from /opt/local/share/java/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/neo4j-0.3.3/lib/neo4j/jars.rb:5
from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/neo4j-0.3.3/lib/neo4j/jars.rb:31:in `require'
from /opt/local/share/java/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/neo4j-0.3.3/lib/neo4j.rb:7
from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/neo4j-0.3.3/lib/neo4j.rb:36:in `require'
from /opt/local/share/java/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from ./ailnet.rb:2
from ./ailnet.rb:256:in `require'
from /opt/local/share/java/jruby/lib/ruby/1.8/irb/init.rb:256:in `load_modules'
from /opt/local/share/java/jruby/lib/ruby/1.8/irb/init.rb:254:in `each'
from /opt/local/share/java/jruby/lib/ruby/1.8/irb/init.rb:254:in `load_modules'
from /opt/local/share/java/jruby/lib/ruby/1.8/irb/init.rb:21:in `setup'
from /opt/local/share/java/jruby/lib/ruby/1.8/irb.rb:54:in `start'
from /opt/local/bin/jirb:19

(2)

The strange thing is that the file causing the complaint is present:

finix2:jars $> pwd
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/neo4j-0.3.3/lib/neo4j/jars
finix2:jars $> ls -l
total 564
-rw-r--r-- 1 root admin 13045 nov 27 08:42 jta-1_1.jar
-rw-r--r-- 1 root admin 458083 nov 27 08:42 neo-1.0-b10.jar
-rw------- 1 root admin 101423 nov 27 08:42 shell-1.0-b10.jar

(3)

I had to continue with the "0.3.2"; that still worked

finix2:rb $> jirb
>> require 'rubygems'
=> true
>> gem "neo4j", "= 0.3.2"
=> true
>> require 'neo4j'
=> true


-- Bert Fitié

Andreas Ronge

unread,
Nov 27, 2009, 4:22:51 AM11/27/09
to neo...@googlegroups.com
Hi

I can't reproduce this bug.
The railway example (in the example/railway folder) is working for me
with 0.3.3.
Can you send me the code ?

/Andreas

Bert Fitié

unread,
Nov 27, 2009, 5:22:37 AM11/27/09
to neo...@googlegroups.com

Hi Andreas,

The problem has (unfortunately) nothing to do with user code:


(1) This does not work on my system

finix2:rb $> jirb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'neo4j'
LoadError: no such file to load -- neo4j/jars/shell-1.0-b10
from /opt/local/share/java/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/local/share/java/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/neo4j-0.3.3/lib/neo4j/jars.rb:5
from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/neo4j-0.3.3/lib/neo4j/jars.rb:31:in `require'
from /opt/local/share/java/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/neo4j-0.3.3/lib/neo4j.rb:7
from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/neo4j-0.3.3/lib/neo4j.rb:36:in `require'
from /opt/local/share/java/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):3
irb(main):003:0> gem "neo4j", "= 0.3.2"
Gem::LoadError: can't activate neo4j (= 0.3.2, runtime) for [], already activated neo4j-0.3.3 for []
from /opt/local/share/java/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:280:in `activate'
from /opt/local/share/java/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:68:in `gem'
from (irb):4
irb(main):004:0> quit

(I couldn't deactivate 0.3.3 so I had to quit jirb)


(2) This does work (in a fresh jirb session)

finix2:rb $> jirb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> gem "neo4j", "= 0.3.2"
=> true
irb(main):003:0> require 'neo4j'
=> true

(This is what I'm now using in my user code - and it works)


-- Bert

Andreas Ronge

unread,
Nov 27, 2009, 6:32:49 AM11/27/09
to neo...@googlegroups.com
Hi

Strange - I still can't reproduce your problem

I have tested the following
jruby -S gem install neo4j
jirb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'neo4j'
=> true

I'm using jruby 1.4.0 on Ubuntu 9.10 and JDK 1.6.0

Bert Fitié

unread,
Nov 27, 2009, 7:01:24 AM11/27/09
to neo...@googlegroups.com

Hi,


I'm using the latest Snow Leopard version (10.6.2) on my iMac:

finix2:~ $> uname -v
Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386


I'm also using jruby 1.4.0 and JDK 1.6.0:

finix2:~ $> jruby --version
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-08 6586) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
finix2:~ $>


This could be a tough one to solve!

-- Bert

Bert Fitié

unread,
Nov 30, 2009, 5:04:35 AM11/30/09
to neo...@googlegroups.com

Problem solved: it was a matter of wrong file permissions that made reading shell-1.0-b10.jar impossible:

finix2:~ $> cd "/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/neo4j-0.3.3/lib/neo4j/jars"
finix2:jars $> jar -tf shell-1.0-b10.jar
java.io.FileNotFoundException: shell-1.0-b10.jar (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun.tools.jar.Main.run(Main.java:206)
at sun.tools.jar.Main.main(Main.java:1044)
finix2:jars $> ls -l
total 564
-rw-r--r-- 1 root admin 13045 nov 27 13:48 jta-1_1.jar
-rw-r--r-- 1 root admin 458083 nov 27 13:48 neo-1.0-b10.jar
-rw------- 1 root admin 101423 nov 27 13:48 shell-1.0-b10.jar
finix2:jars $> sudo chmod 644 shell-1.0-b10.jar
Password:
finix2:jars $> jar -tf shell-1.0-b10.jar
META-INF/MANIFEST.MF
META-INF/
...

I have no idea what the reason is of the wrong file permissions on my system. I simply updated with "sudo jgem update neo4j".
JRuby (with the commands jruby, jgem, jirb etc) I installed via MacPorts.

-- Bert
Reply all
Reply to author
Forward
0 new messages