[Nitro] og troubles

Michael Fellinger m.fellinger at gmail.com
Fri Nov 11 18:42:59 EST 2005


Hi Francesco,

It would be of great interest to me (and all the others i guess) what your 
run.rb and og-model looks like.
The issue with psql-database-creation is known (at least to me) but not fixed 
yet (i created the database once and now morphing is working well for me)
Please provide us with the code you tested so we can add it to the testcases 
and aim on fixing and of course tell you what is wrong with it.

thx in advance
manveru

Am Freitag 11 November 2005 20:48 schrieb Francesco Lunelli:
> Hello to everybody,
> I am looking at Nitro and Og and I find them very interesting.
> At the moment I am trying to experiment with Og.
> And problems start here.
> I installed Og using gem on three different distributions:
>
> 1) debian amd64
> 2) Kubunt AMD64
> 3) Kubunt I386
>
> using postgresql and mysql (and kirby) as databases.
>
> On the Kubuntu AMD64 Og works fine, I can run example or test.
> Instead on the Kubuntu I386 or Debian when I try to run example/run.rb I
> got a lot of errors.
> Using postgresql I got the error that database test doesn't exist.
>
> dropdb: eliminazione database fallita: ERROR:  il database "test" non
> esiste (doesn't exist)
> /usr/local/lib/site_ruby/1.8/og/store/psql.rb:100:in `connect': FATAL:
> il database "test" non esiste (PGError)
>         from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:100:in
> `initialize'
>         from /usr/local/lib/site_ruby/1.8/og/manager.rb:51:in `initialize'
>         from /usr/local/lib/site_ruby/1.8/og/manager.rb:50:in `times'
>         from /usr/local/lib/site_ruby/1.8/og/manager.rb:50:in `initialize'
>         from /usr/local/lib/site_ruby/1.8/og.rb:116:in `setup'
>         from examples/run.rb:147
>
> When I disable database deletion (in run.rb) and create manually the
> test database, run.rb goes a little but stop before reaching the end
> saying that there is a duplicated relation
>
> I, [2005-11-11T20:39:03.234802 #8329]  INFO -- : Created table 'ogarticle'.
> /usr/local/lib/site_ruby/1.8/og/store/psql.rb:222:in `exec': ERROR:  la
> relazione "ogj_article_category" esiste già (PGError)
>         from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:222:in
> `create_table'
>         from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:221:in `each'
>         from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:221:in
> `create_table'
>         from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:219:in
> `create_table'
>         from (eval):6:in `og_create_schema'
>         from /usr/local/lib/site_ruby/1.8/og/store/sql.rb:295:in `enchant'
>         from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:142:in `enchant'
>         from /usr/local/lib/site_ruby/1.8/og/manager.rb:120:in `manage'
>         from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in
> `manage_classes'
>         from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in `each'
>         from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in
> `manage_classes'
>         from /usr/local/lib/site_ruby/1.8/og.rb:117:in `setup'
>         from examples/run.rb:147
>
> This is the error when I try to use mysql instead then postgresql
>
> /usr/local/lib/site_ruby/1.8/og/store.rb:24:in `for_name':
> /usr/local/lib/site_ruby/1.8/og/store/mysql.rb:39:in `alias_method':
> undefined method `fetch_row' for class `Mysql::Result' (NameError)
>         from /usr/local/lib/site_ruby/1.8/og/store/mysql.rb:39
>         from
> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
>         from (eval):2:in `for_name'
>         from /usr/local/lib/site_ruby/1.8/og/manager.rb:46:in `eval'
>         from /usr/local/lib/site_ruby/1.8/og/store.rb:24:in `for_name'
>         from /usr/local/lib/site_ruby/1.8/og/manager.rb:46:in `initialize'
>         from /usr/local/lib/site_ruby/1.8/og.rb:116:in `setup'
>         from examples/run.rb:148
>
> A last thing, when I use Og on the Kubuntu AMD64 run.rb works, but only
> if I edit it and change manually "options" parameter in class Arcticle
> form hash to string.
> If I leave run.rb without changes I got an error saying
>
> /usr/local/lib/site_ruby/1.8/og/store/psql.rb:44:in `escape': wrong
> argument type Hash (expected String) (TypeError) from
> /usr/local/lib/site_ruby/1.8/og/store/psql.rb:44:in `escape' from
> (eval):7:in `og_insert'
>         from /usr/local/lib/site_ruby/1.8/og/store.rb:121:in `save'
>         from /usr/local/lib/site_ruby/1.8/og/entity.rb:16:in `save'
>         from examples/run.rb:153
>
>
> Thanks in advance
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051111/4f4b99b6/attachment.bin 


More information about the Nitro-general mailing list