Unfortunately,
libsqlite3-ruby
1.1.0, the latest available, is buggy. A deterministic program dies with a variety of errors when ran multiple times in a row:/usr/lib/ruby/1.8/sqlite3/driver/native/d river.rb:169:in `sqlite3_step': undefined method `call' for 21:Fixnum (NoMethodError)
/usr/lib/ruby/1.8/sqlite3/driver/native/d river.rb:169:in `sqlite3_step': undefined method `call' for true:TrueClass (NoMethodError)
/usr/lib/ruby/1.8/sqlite3/driver/native/d river.rb:169: [BUG] Segmentation fault
ruby 1.8.4 (2005-12-16) [i486-linux]
Looks like a memory bug. The probably either forgot to register something with the GC or just used something uninitialized. In any case, I need to figure out what approach will be the least painful.
(Update: using DBI's sqlite3 wrapper fixed it, for some reason or another...)