Skip to content

Getting Started with an existing rails project

namxam edited this page Oct 27, 2011 · 3 revisions

This is a work in progress, so please contact me if you have any questions or problems.

  1. Install neo4j (more about that on http://neo4j.org/)

  2. Add architect4r to your rails project

    gem 'architect4r'
  3. Create an architect4r config

    Create a config/architect4r.yml file and add your configuration like this:

    development:
      host: localhost
      port: 7477
      log_level: DEBUG
    
    production:
      host: localhost
      port: 7474
      log_level: WARNING
  4. Create your first Node

    class Person < Architect4r::Model::Node
      property :name, :cast_to => String
      property :birthday, :cast_to => Date
    end
  5. Start your console and check if it is working

    Person.create(:name => 'Max Mustermann', :birthday => Date.today)

    Check your neo4j webadmin (usually: http://localhost:7474) and see if your data is there.

Clone this wiki locally