neo4j.rb

Sidekiq Broken Pipe Error

只谈情不闲聊 提交于 2020-01-15 10:43:15
问题 I am attempting to migrate from Heroku to AWS, but my Sidekiq jobs keep failing with the following error: Errno::EPIPE: Broken pipe @ io_write - <STDOUT> I can successfully run jobs from the console using perform_now , and everything works just fine in Heroku, so I am presuming the issue lies somewhere with my AWS setup. I have seen references to improper daemonization around Stack Overflow and Github but not sure how to solve the problem. Right now I am launching my processes with the

Neo4J Gem - Saving undeclared relationships

倖福魔咒の 提交于 2020-01-05 07:23:10
问题 I am trying to create a realtionship between two nodes as described here https://github.com/neo4jrb/neo4j/wiki/Neo4j-v3-Declared-Relationships from_node.create_rel("FRIENDS", to_node) I am getting an undefined method for create_rel What am I doing wrong? I am trying to create a Q+A system inside another model. So both Questions and Answers are treated as models right now. I'm getting a undefined method create_rel' for # event.rb has_many :out, :event_questions event_question.rb has_one :in,

Neo4j gem - Detailed Querying direction with has_many: both

故事扮演 提交于 2020-01-04 17:34:55
问题 I was able to do a specific pattern match from this original question Neo4j gem - Preferred method to deal with admin relationship via this Event.query_as(:event).match("(event)<-[invite:invited]-(user1:User)<-[friends_with:friends_with]-(user2:User)").where('invite.admin = true').pluck(:event) I was unable to get a modified version such as this to work current_user.friends.events.query_as(:event).match("(event)<-[invite:invited]-(user:User)").where(invite: {admin: true}).pluck(:event) So

Neo4j gem - Detailed Querying direction with has_many: both

送分小仙女□ 提交于 2020-01-04 17:34:06
问题 I was able to do a specific pattern match from this original question Neo4j gem - Preferred method to deal with admin relationship via this Event.query_as(:event).match("(event)<-[invite:invited]-(user1:User)<-[friends_with:friends_with]-(user2:User)").where('invite.admin = true').pluck(:event) I was unable to get a modified version such as this to work current_user.friends.events.query_as(:event).match("(event)<-[invite:invited]-(user:User)").where(invite: {admin: true}).pluck(:event) So

Neo4j Cypher : transfer all relationships before replacing a node by another

大憨熊 提交于 2020-01-04 03:25:22
问题 I'm trying to transfert all ingoing and outgoing relationships from a node to another, before deleting the first one. they both have the same label. I saw this Neo4j Cypher: copy relationships and delete node but in my case i don't know the type of the relations and i want to transfer both ingoing and outgoing ones. i'm looking for either a cypher query or a query based on neo4j.rb 回答1: I don't think that this is possible with pure cypher. Here's a solution using neo4j.rb that I think will

Server not available on localhost with response code 403 & RuntimeError in Ruby on Rails

前提是你 提交于 2019-12-25 14:09:37
问题 After changing proxy settings in open_uri.rb and server_manage.rb I finally managed to install neo4j behind a proxy server. The neo4j server is running on port 7000 ( It opens in the browser) but when i enter : $rails generate scaffold post title body Error : /.rvm/gems/ruby-2.2.3/gems/neo4j-core-5.1.6/lib/neo4j-server/cypher_session.rb:51:in `open': Server not available on http://localhost:7000 (response code 403) (RuntimeError) What should I do ? Any help is appreciated!! $ ruby --version

Server not available on localhost with response code 403 & RuntimeError in Ruby on Rails

不羁的心 提交于 2019-12-25 14:08:27
问题 After changing proxy settings in open_uri.rb and server_manage.rb I finally managed to install neo4j behind a proxy server. The neo4j server is running on port 7000 ( It opens in the browser) but when i enter : $rails generate scaffold post title body Error : /.rvm/gems/ruby-2.2.3/gems/neo4j-core-5.1.6/lib/neo4j-server/cypher_session.rb:51:in `open': Server not available on http://localhost:7000 (response code 403) (RuntimeError) What should I do ? Any help is appreciated!! $ ruby --version

Server not available on localhost with response code 403 & RuntimeError in Ruby on Rails

微笑、不失礼 提交于 2019-12-25 14:08:20
问题 After changing proxy settings in open_uri.rb and server_manage.rb I finally managed to install neo4j behind a proxy server. The neo4j server is running on port 7000 ( It opens in the browser) but when i enter : $rails generate scaffold post title body Error : /.rvm/gems/ruby-2.2.3/gems/neo4j-core-5.1.6/lib/neo4j-server/cypher_session.rb:51:in `open': Server not available on http://localhost:7000 (response code 403) (RuntimeError) What should I do ? Any help is appreciated!! $ ruby --version

Neo4j.rb : transfer all relationships before replacing a node by another

杀马特。学长 韩版系。学妹 提交于 2019-12-24 17:21:12
问题 I'm trying to transfert all ingoing and outgoing relationships (including their properties) from a node to another, before deleting the first one. they both have the same label. The discussion started here : Neo4j Cypher : transfer all relationships before replacing a node by another node_query = Neo4j::Session.query.match(old_node: {uuid: node1.uuid}).match(new_node: {uuid: node2.uuid}) types = node_query.match('node-[rel]-()').pluck('DISTINCT type(rel)') types.each do |type| node_query

from Neo4j to GraphJSON with Ruby

馋奶兔 提交于 2019-12-24 15:52:51
问题 I'm trying to get visualizations using d3.js or alchemy.js--but alchemy, in particular, requires the datasource to be in GraphJSON. I've been playing around with the tutorials and examples of Max De Marzi (using neography), Michael Hunger (cy2neo, js), Neo4j, and Neo4j.rb -- but I cannot seem to get all the way there. Mostly because I don't know what I'm doing--but this is how I'm trying to learn. What I'm trying to achieve would be along the lines of: https://bl.ocks.org/mbostock/3750558 or