Skip to content

Instantly share code, notes, and snippets.

View tjackiw's full-sized avatar

Thiago Jackiw tjackiw

  • San Francisco Bay Area
View GitHub Profile
@tjackiw
tjackiw / gist:4332822
Created December 18, 2012 22:50
Using a Graph Database with Ruby. Part II: Integration
# Friendship migration
class CreateFriendships < ActiveRecord::Migration
def change
create_table :friendships do |t|
t.integer :user_id
t.integer :friend_id
t.timestamps
end
end
end
@tjackiw
tjackiw / gist:4332809
Created December 18, 2012 22:48
Using a Graph Database with Ruby. Part II: Integration
# User migration
class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :name
t.string :age
t.timestamps
end
end
end
@tjackiw
tjackiw / gist:4332789
Created December 18, 2012 22:45
Using a Graph Database with Ruby. Part II: Integration
$ rails g model friendship
@tjackiw
tjackiw / gist:4332786
Created December 18, 2012 22:45
Using a Graph Database with Ruby. Part II: Integration
$ rails g model user
@tjackiw
tjackiw / gist:4330220
Created December 18, 2012 17:47
Using a Graph Database with Ruby. Part II: Integration
$ open http://localhost:7474/webadmin/
@tjackiw
tjackiw / gist:4330215
Created December 18, 2012 17:47
Using a Graph Database with Ruby. Part II: Integration
$ neo4j stop
@tjackiw
tjackiw / gist:4330212
Created December 18, 2012 17:46
Using a Graph Database with Ruby. Part II: Integration
$ neo4j start
@tjackiw
tjackiw / gist:4326572
Created December 18, 2012 09:25
Using a Graph Database with Ruby. Part II: Integration
$ rails new neoid_example -S -J
@tjackiw
tjackiw / gist:4326369
Created December 18, 2012 09:03
Using a Graph Database with Ruby. Part II: Integration
gem 'neoid', git: 'git://github.com/elado/neoid.git'
@tjackiw
tjackiw / gist:4326321
Created December 18, 2012 08:59
Using a Graph Database with Ruby. Part II: Integration
$ gem install 'neography'