by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Tomasz Kapłon
@kapone89
I've you've stopped supporting seabolt and current driver for regular ruby uses it, does it mean, that the support for ruby is limited?
Heinrich Klobuczek
@klobuczek
activegraph works on any ruby and that will stay like that. It requires a driver. Right now neo4j-ruby-driver and neo4j-java-driver have identical functionality. That may change in the future in which case if using 1 of the drivers you may have more configuration options.
neo4j-ruby-driver is at the 1.7 driver level
Tomasz Kapłon
@kapone89
Ok, I think I understand now. Thank you
Heinrich Klobuczek
@klobuczek
what do you mean when you say it works in neo4j web interface?
Tomasz Kapłon
@kapone89
Neo4j database has a web interface on 7474 port where you can run queries, visualize them etc.
Heinrich Klobuczek
@klobuczek
the web interface is http
Tomasz Kapłon
@kapone89
and when you enter it, you need to choose connection method
image.png
both neo4j and bolt works
I don't know how this web client is implemented. I just know that it sends bianary data via websockets. I don't know if choosing neo4j schema in it is the same as using this schema in external clients
Heinrich Klobuczek
@klobuczek
it probaly uses neo4j javascript driver
what’s your server config? Causal cluster, HA or SINGLE?
Tomasz Kapłon
@kapone89
I'm running it locally for now. So SINGLE I guess. Without additional configuration, It's basically this Dockerfile https://github.com/neo4j/docker-neo4j-publish/blob/07dcb3dd43df67337f74af5a71decc45d50b712d/4.0.6/enterprise/Dockerfile
Ok, I need to go. Thanks for your help :-)
Heinrich Klobuczek
@klobuczek
@ekampp @kapone89 the last note in this paragraph may apply to you: https://neo4j.com/docs/driver-manual/current/client-applications/#driver-routing-context
Tomasz Kapłon
@kapone89
@klobuczek Thank you. It looks like a solution. However I've tried to set NEO4J_dbms_default__advertised__address=neo4j variable an I'm still unable to connect via neo4j schema.
Heinrich Klobuczek
@klobuczek
this not how you configure neo4j, read ne4j manuals
this is server configuration
Tomasz Kapłon
@kapone89
This is my part of docker-compose.yml file:
  neo4j:
    image: neo4j:4.0.4-enterprise
    ports:
      - 7474:7474
      - 7687:7687
    environment:
      NEO4J_AUTH: none
      NEO4J_ACCEPT_LICENSE_AGREEMENT: "yes"
      NEO4J_dbms_default__advertised__address: "neo4j"
Heinrich Klobuczek
@klobuczek
not sure how you came to the last entry, you have to configure neo4j in conf/neo4j.conf and definitely read the manuals
Tomasz Kapłon
@kapone89
I've found in the manual, that there is an option to use env variables instead of config file. Let me find it...
Heinrich Klobuczek
@klobuczek
are you addressing the server like this: neo4j://neo4j:7687?
Tomasz Kapłon
@kapone89
Yes
Heinrich Klobuczek
@klobuczek
sorry need to go to bed, this is beyond activegraph and the driver
if you have a SINGLE server you can use bolt protocol with no difference
Heinrich Klobuczek
@klobuczek
@kapone89 My colleague is adding that:
  - dbms.connector.https.advertised_address=:7473
  - dbms.connector.http.advertised_address=:7474
  - dbms.connector.bolt.advertised_address=:7687
Heinrich Klobuczek
@klobuczek
But I’m not convinced that is necessary
Tomasz Kapłon
@kapone89
Thank you so much. We will try :-)
mstrofbass
@mstrofbass
Got an application that's using ActiveNode/ActiveRel and doing a query manually via Neo4j::ActiveBase.current_session.query. Locally the result set is return the relationships as Neo4j::Core::Relationship but I push it to Heroku and it's returning the correct ActiveRel type. Anyone know off the top of the head what I should be looking at to figure out why it's not returning the ActiveRel type locally?
2 replies
OpenCoderX
@OpenCoderX
Does it load the correct class in development if you reboot the app and do not edit any files after the app boots?
@mstrofbass
Easwar Chowdary
@nandueverurs_twitter
Hi all. We are using Neo4j 9.5.2 gem and neo4jcore is 9.0.0 version. We are using bolt protocol. It runs good but if app is inactive for some time it throws error "Query attempted without a connection" . Can you pls help if someone has already faced and fixed. @klobuczek
Heinrich Klobuczek
@klobuczek
@nandueverurs_twitter that’s too old to be fixed, please use activegraph gem if you can.
Easwar Chowdary
@nandueverurs_twitter
@klobuczek But it is a legacy application with ruby 2.3 version. Can you suggest me the best stable activegraph version
Heinrich Klobuczek
@klobuczek
@nandueverurs_twitter if you look at https://github.com/neo4jrb/activegraph/blob/v9.6.2/.travis.yml you can see what versions are supported. Not saying that 9.6.2 will solve your bug, but with it some new opportunities come to light. You can use there the https://github.com/neo4jrb/neo4j-ruby-driver. Have a look at the README and have a look as well at https://neo4jrb.readthedocs.io/en/v9.6.2/Setup.html#rails-configuration
That is pretty much all the support we are able to provide at the moment.
Romain
@RomainCavrot_gitlab
Hi,
I'm having a problem with devise-activegraph.
Everything works fine but when I try to run a rake task from a controller using 'system()' I get this error.
LoadError: cannot load such file -- /home/rhums/HR/HRoads/vendor/ruby/2.6.0/gems/devise-activegraph-3.0.0.alpha.1/lib/devise/orm
Do you have an idea?
Heinrich Klobuczek
@klobuczek
activegraph-10.0.0 is released.
In the next few days the satelite gems like cancancan-activegraph and devise-activegraph should get released.
Marek Zieliński
@m-zielinski
@klobuczek In the migration docs (https://neo4jrb.readthedocs.io/en/v10.0.0/UpgradeGuide.html) there is a bunch of typos which may cause pain when copy/pasted ('ActiveGrah', 'AciveRel' and 'ActiveGrapph'). It happened to me...
Heinrich Klobuczek
@klobuczek
How about a PR?
Sorry about that, was late at night.
2 replies
Heinrich Klobuczek
@klobuczek
@m-zielinski in general did you encounter any other difficulties or issues with the migrations not described in the Upgrade Guide?
Marek Zieliński
@m-zielinski
@klobuczek Thank you! I'm working on it. Will let know here.
Marek Zieliński
@m-zielinski
@klobuczek , I'm trying to use the neo4j-java-driver gem and it shows up, it uses a hardcoded 1.7.5 version of the org.neo4j.driver. What are the options to make it work with the 4.x version of the Java driver?
The question comes from trouble connecting to Neo4j 4.0, which (for cypher-shell) disappeared after upgrading the Java driver locally.
4 replies
Subin Sapkota
@SubinSapkota_twitter
Hi,
I have a Post model that has_many comments. I’m trying to eager fetch the comments, and limit it to 2 comments per post. But it seems limits in relationships during eager fetch is not possible. Is there a better way to handle this while avoiding a N+1 query problem?
Heinrich Klobuczek
@klobuczek
Yes, been there before. This is not implemented as it is not straightforward. Maybe somehing like this is available in apoc. If it were implemented the next thing you would ask for is to specify the order of the comments to choose first 2 and then to paginate through the comments. We have attempted something like this outside of activegraph but never deemed it good or elegant enough to include it in activegraph. On the other hand you shouldn’t request more than 20 (or your page size) of posts, so at the end it is like 1 + 20, which is not ideal but not the end of the world either.
11 replies
Tomasz Kapłon
@kapone89
@klobuczek What is the proper way of overwriting properties/associations setters in models? Defining own property_or_association= method and calling super in it works randomly. Where are those setters defined in activegraph's source?