[Nitro] Og in glycerin is broken now.

Fang Sun nusgnaf at gmail.com
Sun Aug 27 04:35:40 EDT 2006


Ah, better example to demonstrate this:
----------8<---------
require 'repo.nitroproject.org/glycerin'
require 'og'
class U
    property :name, String
end

Og.start
u = U.new
u.name = "haha"
u.save!

fang at fang:~/Ruby/code$ ruby a.rb
 INFO: Og uses the Sqlite store.
a.rb:10: undefined method `save!' for #<U:0xb7b98068 @name="haha">
(NoMethodError)
-----------8<--------

recheck data.db find out the table isnot created. Uncomment the first
line, rerun the script
=======
fang at fang:~/Ruby/code$ ruby a.rb
 INFO: Og uses the Sqlite store.
 INFO: Created table 'ogu'

fang at fang:~/Ruby/code$ sqlite3 data.db '.dump'
BEGIN TRANSACTION;
CREATE TABLE ogu (name text, oid integer PRIMARY KEY);
INSERT INTO "ogu" VALUES('haha', 1);
COMMIT;
=======


More information about the Nitro-general mailing list