How to setup Ruby on Rails with Neo4j database on Macbook M1? Ruby 2.7.7 and Rails 5.2.8.1

33 Views Asked by At

I've been trying to setup Neo4j in my existing Rails project which has Rails version 5.2.8.1 and Ruby 2.7.7

I've gone through almost every documentation i could find and had long chats with ChatGPT but nothing has worked so far.

I'm trying to run Neo4j with Docker.

My docker-compose file is as follows:

version: '3.8'

services:
  neo4j:
    image: neo4j
    ports:
      - 7474:7474
      - 7687:7687
    environment:
      - NEO4J_AUTH=neo4j/password
      - NEO4J_dbms_memory_pagecache_size=512m
    volumes:
      - ./neo4j/data:/data
      - ./neo4j/logs:/logs

I've tried various combinations of settings with neo4j.yml, neo4j.conf and application.rb Nothing has worked unfortunately.

If anyone can help me with steps to setup even a new Rails app with ruby 2.7.7 and with any recent version of Neo4j, that'll be immensely helpful !!

Docker works. I can run graph database and run cypher queries in the browser. But from rails, it doesn't work.

The most i could get to was being able to run a MATCH query but when it came to creating nodes or running neo4j:migrate command, it didn't work at all.

0

There are 0 best solutions below