Questions tagged [neo4j.rb]

Neo4j.rb is an Active Model compliant Ruby/JRuby wrapper for the Neo4j graph database. It uses the neo4j-core and active_attr gems.

Neo4j.rb is an Active Model compliant Ruby/JRuby wrapper for the Neo4j graph database.

https://github.com/neo4jrb/neo4j

175 questions
6
votes
2 answers

How do I remove ActiveRecord from an existing Rails 4 Application?

I started off a Ruby on Rails Project which includes a simple recommender system with ActiveRecord and Neography. Now I found out about neo4j.rb, which is going to simplify my life by a lot. :-) I learned by now, that I could create a new…
Joe Eifert
  • 1,306
  • 14
  • 29
5
votes
2 answers

Neo4j - pagination from Ruby on Rails

What is the best pagination option from Ruby on Rails when using Neo4j? I am looking to paginate with Kaminari, will_paginate gem or even Bootstrap. Any recommendation?
LDB
  • 692
  • 6
  • 18
5
votes
2 answers

Neo4j.rb create unique relationship

Here is my Neo4j Active Node class User include Neo4j::ActiveNode has_many :out, :following, type: :following, model_class: 'User' end john = User.find(:name => "John") tom = User.find(:name => "Tom") # create following relationship john -->…
Raj Adroit
  • 3,828
  • 5
  • 31
  • 44
4
votes
1 answer

Neo4j: How to filter out nodes from a list of IDs?

I am trying to "select all posts" and exclude specific nodes that are in an array of IDs (post authors). With SQL you can use NOT IN (1, 2, 3). How can I create a CYPHER query to do this? Post <-- author -- User - ID - ID
Andrew
  • 227,796
  • 193
  • 515
  • 708
4
votes
2 answers

Should I use JRuby or Ruby for Rails with Neo4j.rb?

I'm using Neo4j.rb for Integrating Neo4j Graph database with Rails. Should I use JRuby or Ruby? What's the difference (any pros/cons) when using neo4j.rb with JRuby and Ruby? Some of the examples are telling to use JRuby and I'm able to execute the…
Raj Adroit
  • 3,828
  • 5
  • 31
  • 44
4
votes
1 answer

Neo4j gem - Querying relationships that do not exist

I don't really have the code for this yet but I have the opposite of what I need current_user.friends(:f).match_to(event) This is going to return the friends that have a relationship to my event node. What I need is the ones that don't have this…
Clam
  • 935
  • 1
  • 12
  • 24
4
votes
4 answers

rake db:seed is not working using neo4j gem

I have stated working on neo4j with rails using the gem 'neo4j', I want to seed some data in neo4j database. But whenever I am trying to do rake db:seed, it says rake aborted! Don't know how to build task 'db:seed' I have checked all the rake…
Sabyasachi Ghosh
  • 2,765
  • 22
  • 33
4
votes
1 answer

Creating Relationships in Neo4J model with after_save

So I apologize for how noobish these questions may seem. I'm new to rails and as a first task I also brought in Neo4J as it seemed like the best fit if I grow the project. I'll explain the flow of actions then show some example code. I'm trying to…
Clam
  • 935
  • 1
  • 12
  • 24
3
votes
0 answers

Retrieving subgraph using neo4j.rb

Currently have a graph schema defined with a single node type and a single relationship type. My goal is to pass a particular subgraph to a graph visualization utility for display, so I need to get all nodes and all relationships between the nodes.…
bstovall
  • 101
  • 1
  • 8
3
votes
1 answer

Neo4j.rb giving two types of object on same query (randomly)

Neo4j version - 3.1.1 Neo4j.rb - 8.0.13 Rails - 4.2.2 I am using these versions on local, somtimes same query is giving different results, I am noticing this issue from couple of days since I have tried to upgrade my application (Rails) but that's…
Vishal G
  • 1,521
  • 11
  • 30
3
votes
2 answers

Rails 6 and neo4j.rb?

Is there development happening for Rails 6 in Neo4j.rb? In a new rails 6(rc1) project, if I create a couple scaffolds then run 'rake neo4j:migrate:all' I get an error that when I follow it quickly rabbitholes much deeper into the internals of…
metkat
  • 464
  • 4
  • 10
3
votes
1 answer

Neo4j, Capistrano deployment, Authentication error

I want to deploy a Rails application, using Neo4jrb, to production with Capistrano. During deployment the following error shows up: DEBUG [5a528d81] Finished in 0.057 seconds with exit status 0 (successful). INFO [acd66fd5] Running…
3
votes
1 answer

neo4j.rb find path between nodes

I would like to find all paths between two nodes in my graph using neo4j.rb I know how to write a cypher query for the same and the following source https://github.com/neo4jrb/neo4j/wiki/Neo4j%3A%3ACore-Traverse indicates an "outgoing" function. But…
Artemis Fowl
  • 301
  • 1
  • 10
3
votes
2 answers

Neo4j.rb - index paginated with Kaminari too slow

Here is my controller (index is sorted): def index if params[:limit] @bisacs = Bisac.order(:bisac_code).page(params[:page]).per(params[:limit]) else @bisacs = Bisac.order(:bisac_code).page(params[:page]) end end Here are…
LDB
  • 692
  • 6
  • 18
3
votes
1 answer

Neo4j - Why uuid is null for all nodes but the database keeps indexing them and attempts to use them during searches?

Here is a brief description of the problem: irb(main):001:0> b = Bisac.first CYPHER 268ms MATCH (n:`Bisac`) RETURN n ORDER BY n.uuid LIMIT {limit_1} | {:limit_1=>1} => #
LDB
  • 692
  • 6
  • 18
1
2 3
11 12