from /usr/lib/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/
statement.rb:37:in execute' from /usr/lib/ruby/gems/1.9.1/gems/dbi-0.4.2/lib/dbi/ base_classes/database.rb:96:inexecute’
from /usr/lib/ruby/gems/1.9.1/gems/dbi-0.4.2/lib/dbi/
base_classes/database.rb:114:in do' from /usr/lib/ruby/gems/1.9.1/gems/dbi-0.4.2/lib/dbi/handles/ database.rb:106:indo’
from /usr/lib/ruby/site_ruby/1.9.1/odba/storage.rb:176:in create_index' from /usr/lib/ruby/site_ruby/1.9.1/odba/index.rb:226:ininitialize’
from /usr/lib/ruby/site_ruby/1.9.1/odba/cache.rb:148:in new' from /usr/lib/ruby/site_ruby/1.9.1/odba/cache.rb:148:inblock
in create_index’
from /usr/lib/ruby/site_ruby/1.9.1/odba/storage.rb:558:in call' from /usr/lib/ruby/site_ruby/1.9.1/odba/storage.rb:558:inblock in transaction’
from /usr/lib/ruby/gems/1.9.1/gems/dbi-0.4.2/lib/dbi/handles/
database.rb:209:in transaction' from /usr/lib/ruby/site_ruby/1.9.1/odba/connection_pool.rb: 36:inblock in method_missing’
from /usr/lib/ruby/site_ruby/1.9.1/odba/connection_pool.rb:
26:in next_connection' from /usr/lib/ruby/site_ruby/1.9.1/odba/connection_pool.rb: 35:inmethod_missing’
from /usr/lib/ruby/site_ruby/1.9.1/odba/storage.rb:554:in transaction' from /usr/lib/ruby/site_ruby/1.9.1/odba/cache.rb:520:intransaction’
from /usr/lib/ruby/site_ruby/1.9.1/odba/cache.rb:140:in create_index' from /usr/lib/ruby/site_ruby/1.9.1/odba/cache.rb:131:inblock
in create_deferred_indices’
from /usr/lib/ruby/site_ruby/1.9.1/odba/cache.rb:125:in each' from /usr/lib/ruby/site_ruby/1.9.1/odba/cache.rb:125:increate_deferred_indices’
from /usr/lib/ruby/site_ruby/1.9.1/odba/cache.rb:437:in setup' from /usr/lib/ruby/site_ruby/1.9.1/oddb/persistence/odba.rb: 35:inmodule:ODDB’
from /usr/lib/ruby/site_ruby/1.9.1/oddb/persistence/odba.rb:
28:in <top (required)>' from /var/www/ramaze.ch.oddb.org/model/init.rb:3:inrequire’
from /var/www/ramaze.ch.oddb.org/model/init.rb:3:in <top (required)>' from /var/www/ramaze.ch.oddb.org/app.rb:32:inrequire’
from /var/www/ramaze.ch.oddb.org/app.rb:32:in <top (required)>' from start.rb:7:inrequire’
from start.rb:7:in `’
That is what we are trying to find out ourself. ODBA our software - at
start up of our software - checks if the tables of the database are
there or not. When checking one such table we guess (our traceback) ODBA
fails at the method
@pg_conn.exec_prepared(stmt_name, parameters)
Normally ODBA would find all the tables and then load the data into the
cache. But since Ruby 1.9.2 ODBA stops at the above point.
What is the actual difference between dbd-pg and pg?
Ok, it seems that this again is related to some subtle changes from Ruby
1.9.1 to Ruby 1.9.2. So we are now digging back into ODBA and comparing
both processes on Ruby 1.9.1 and Ruby 1.9.2 on Linux.
Freaks me out this inconsistency in Ruby 1.9 itself!
You don’t actually show the exception, only the backtrace. What is the
actual error?
Not sure why you broke the threading by the way.
You seemed to miss his question, he was asking for the actual
exception which was raised, not just the backtrace.
From your link this would appear to be:
/usr/lib64/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:71:in
`rescue in execute’: ERROR: relation “oddb_business_company_name”
already exists (DBI::ProgrammingError)
This doesn’t look like a bug in the pg gem or in Ruby 1.9.2, but with
the prepared statement you are executing or the state of the database
when you execute it.
Ok just FYI we solved the problem. It again (after the Hash-Iteration
problem - thank you Chuck R.) was in dbi. What we had to do is force
the Array in dbi, as so: