["T","..." /> ["T","..." /> ["T","..."/>

Arrays in NEO4j using Neography+Heroku

94 views Asked by At

I am running a rake process that imports my data into Neo4j. It's all fine until arrays come up. Here's a sample:

{:spelling=>"the", :letters=>["T","H","E"], :length=>2, :rank=>1, :part_of_speech=>"article"}

Here's the ruby code for importing it that fails:

node = @neo.create_unique_node("words", "spelling_phonemes", a[:spelling]+','+a[:phonemes], {"spelling" => a[:spelling], "length" => a[:length], "letters" => a[:letters].split(','), "rank" => a[:rank], "part_of_speech" => a[:part_of_speech]})

Here's the error: Unknown property type on: [T, H, E], class java.util.ArrayList

It's working fine on locally. What gives! From reading around, it seems likes ArrayList might be the issue as only type Array works. If that's the case, how do I ensure that the ruby array is casted/converted properly as a Java Array ?! Thanks!

Also, using neo4j 2.0 locally and Heroku is 1.8.1 I think.

1

There are 1 answers

0
Max De Marzi On

1.8.1 is ancient and probably not compatible with any recent neography versions... If you want a remotely hosted version that is current (on 2.0) try http://www.graphenedb.com