[Nitro] Problems...

Jeff Wood jeff.darklight at gmail.com
Sat Aug 27 13:14:38 EDT 2005


I have Nitro & SQLite3 both setup as rubygems on my system.

I'm trying to run the following through irb.

require 'rubygems'
require 'sqlite3'
require 'og'

db = Og.setup( :store => :sqlite, :database => 'blah.db' )

class User
  property :name, String
  property :pass, String
  property :age, Fixnum
  has_many :comments, Comment

class Comment
  property :title, String
  property :body, String
  belongs_to :owner, User

a = User.new
a.name = "joe blow"
a.pass = "shhh"
a.age = 13

b = Comment.new
b.title = "Comment #1"
b.body = "testing 1 2 3"

a.comments << b

And at the comments << b line it blows up saying that there is no
comments method for User.

What am I doing wrong?


"So long, and thanks for all the fish"

Jeff Wood

More information about the Nitro-general mailing list