neoid-gem / neoid

Extend Ruby on Rails ActiveRecord with Neo4j nodes. Keep RDBMS and utilize the power of Neo4j queries.
MIT License
171 stars 33 forks source link

Neoid error #14

Closed gaaady closed 11 years ago

gaaady commented 11 years ago

I got neoid running on development but I'm getting errors running it against an EC2 neo4j from Heroku

The strange thing is that when I tried inserting nodes directly from neography - it worked :

@neo = Neography::Rest.new node1 = @neo.create_node("age" => 31, "name" => "Max1") <- Successfully created a node

but

Profile.create

raised this error: https://gist.github.com/827c9c170421aedb4360

I got the same error when trying to create a profile on EC2 server from my local machine

elado commented 11 years ago

Did you configure Neoid.db as described on the readme?

gaaady commented 11 years ago

yes, it works great in development. I think it's a version problem. What is the recommended way to install the latest version on EC2?

On Wed, Jan 9, 2013 at 8:38 PM, Elad Ossadon notifications@github.comwrote:

Did you configure Neoid.db as described on the readme?

— Reply to this email directly or view it on GitHubhttps://github.com/elado/neoid/issues/14#issuecomment-12059727.

elado commented 11 years ago

Neoid tries to access profiles_index which is not found.

  1. Make sure you're running on the same, latest Neoid version on development and EC2
  2. Since v0.1 these are disabled by default, see, https://github.com/elado/neoid/blob/master/CHANGELOG.md and it's unnecessary to enable it unless you have old code accessing those indexes.
  3. When these model indexes are disabled, Neoid shouldn't try to access them
  4. If you enable this option (enable_per_model_indexes), Neoid creates these indexes on app initialization.

Could it be that you have deleted the data on Neo4j? If so, restart your app to restore those indexes. But again, in case you haven't used the model indexes before, you don't need them anymore since it uses auto indexing.