[Nitro] Trying Og example

Brian Candler B.Candler at pobox.com
Mon Aug 15 16:20:30 EDT 2005


I'm just trying out og-0.22.0 starting with examples/run.rb. I have mysql
rather than psql installed, so I made what seems to be the obvious change:

--- run.rb~     Mon Aug 15 21:10:41 2005
+++ run.rb      Mon Aug 15 21:10:41 2005
@@ -136,10 +136,10 @@
 
 config = {
   :destroy => true, # destroy table created from earlier runs.
-  :store => 'psql',
+  :store => 'mysql',
   :name => 'test',
-  :user => "postgres",
-  :password => "navelrulez"
+  :user => "root",
+  :password => ""
 }
 
 # Initialize Og


Running it gives the following output:

Database "test" dropped
 INFO: Database 'test' not found!
DEBUG: Og manageable classes: [Part, UserComment, ArticleComment, Category, Article, User, Comment]
 INFO: Created table 'ogpart'.
 INFO: Created table 'ogusercomment'.
 INFO: Created table 'ogarticlecomment'.
 INFO: Created table 'ogcategory'.
 INFO: Created table 'ogarticle'.
DEBUG: Join table already exists
/v/build/nitro/ruby-mysql-0.2.6/mysql.rb:453:in `read': BLOB/TEXT column 'name' used in key specification without a key length (Mysql::Error)
        from /v/build/nitro/ruby-mysql-0.2.6/mysql.rb:345:in `read_query_result'
        from /v/build/nitro/ruby-mysql-0.2.6/mysql.rb:160:in `real_query'
        from /v/build/nitro/ruby-mysql-0.2.6/mysql.rb:275:in `query'
        from /v/build/nitro/og-0.22.0/lib/og/store/mysql.rb:215:in `create_table'
        from (eval):5:in `send'
        from (eval):5:in `og_create_schema'
        from /v/build/nitro/og-0.22.0/lib/og/store/sql.rb:290:in `enchant'
        from /v/build/nitro/og-0.22.0/lib/og/store/mysql.rb:138:in `enchant'
        from /v/build/nitro/og-0.22.0/lib/og/manager.rb:128:in `manage'
        from /v/build/nitro/og-0.22.0/lib/og/manager.rb:183:in `manage_classes'
        from /v/build/nitro/og-0.22.0/lib/og/manager.rb:183:in `each'
        from /v/build/nitro/og-0.22.0/lib/og/manager.rb:183:in `manage_classes'
        from /v/build/nitro/og-0.22.0/lib/og.rb:157:in `setup'
        from run.rb:147

I'm running ruby-mysql-0.2.6 and mysql 4.1.11. Any suggestions where to
look to fix this? Or is mysql not well supported by Og?

Thanks,

Brian.



More information about the Nitro-general mailing list