SQLite3 gem errors

210 views
Skip to first unread message

ste...@niteflyte.net

unread,
Nov 17, 2016, 5:43:53 PM11/17/16
to sqlite3-ruby
Ruby version 2.3.0
SQLite 3 gem version  1.3.12
SQLite3 version 3.15.0

I have a program that's been using the SQLite3 gem for a number of years.  It's been running on this version of ruby for a long time too. It runs as part of the mail delivery pipeline (by dovecot):

All of a sudden I'm seeing the following in my mail log:

/usr/local/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.12/lib/sqlite3/pragmas.rb:301: warning: method redefined; discarding old integrity_check

Nov 17 14:25:14 dave dovecot: lmtp: Error: /usr/local/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.12/lib/sqlite3/pragmas.rb:107: warning: previous definition of integrity_check was here

Nov 17 14:25:14 dave logstats[29232]: Error: unrecognized auto_vacuum true


The 'integrity_check' method is indeed re-defined.  There's no line number/filename wrt the 'auto_vacuum' problem.

Anyone know how to fix this?  Thanks in advance...

Steve Witten



Aaron Patterson

unread,
Nov 17, 2016, 5:48:46 PM11/17/16
to sqlite...@googlegroups.com
Hi,

Thanks for the bug report.  I'll fix the issue with the `integrity_check` and create a new release.  Are you calling `auto_vacuum` in any of your code?  I see it implemented in the gem, but it doesn't actually seem to be used by anything right now.

As a work-around, just downgrade to version 1.3.11 until I can ship 1.3.13.

--
You received this message because you are subscribed to the Google Groups "sqlite3-ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlite3-ruby...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ste...@niteflyte.net

unread,
Nov 17, 2016, 7:36:53 PM11/17/16
to sqlite3-ruby


On Thursday, November 17, 2016 at 2:48:46 PM UTC-8, Aaron Patterson wrote:
Hi,

Thanks for the bug report.  I'll fix the issue with the `integrity_check` and create a new release.  Are you calling `auto_vacuum` in any of your code?  I see it implemented in the gem, but it doesn't actually seem to be used by anything right now.

I found the ref to 'auto_vacuum' & commented it out...  Has this been deprecated?  Here's the snippet:

        begin

            @db = SQLite3::Database.new(Strings::STATSDB)

            @db.results_as_hash = true

            @db.busy_timeout = 10

#            @db.auto_vacuum = true

            @db.execute("pragma foreign_keys=on;")

        rescue SQLite3::LockedException => l

 
As a work-around, just downgrade to version 1.3.11 until I can ship 1.3.13.

Will do... thanks

-- sw
 

Aaron Patterson

unread,
Nov 17, 2016, 7:38:33 PM11/17/16
to sqlite...@googlegroups.com

On Nov 17, 2016, at 3:38 PM, ste...@niteflyte.net wrote:



On Thursday, November 17, 2016 at 2:48:46 PM UTC-8, Aaron Patterson wrote:
Hi,

Thanks for the bug report.  I'll fix the issue with the `integrity_check` and create a new release.  Are you calling `auto_vacuum` in any of your code?  I see it implemented in the gem, but it doesn't actually seem to be used by anything right now.

I found the ref to 'auto_vacuum' & commented it out...  Has this been deprecated?

No, it isn't deprecated.  It looks like it just doesn't have any tests.  I will add tests for it and make sure it's fixed in the upcoming release.  Thanks for the sample code!

RodMcGuire

unread,
Nov 18, 2016, 10:23:01 AM11/18/16
to sqlite3-ruby, tende...@ruby-lang.org


On Thursday, November 17, 2016 at 7:38:33 PM UTC-5, Aaron Patterson wrote:

No, it isn't deprecated.  It looks like it just doesn't have any tests.  I will add tests for it and make sure it's fixed in the upcoming release.  Thanks for the sample code!


Will the new release work in Windows? Or will we still need to follow the clumsy workaround given  in [1]?

[1] https://groups.google.com/forum/#!topic/sqlite3-ruby/aW5XxyrgJIE
 

Aaron Patterson

unread,
Nov 18, 2016, 11:28:08 AM11/18/16
to sqlite...@googlegroups.com
Honestly, I don't know.  I will make sure the Windows CI is green before release (it's not green right now[1]).  I release pre-compiled binaries for Windows as well.  However, I don't personally have a Windows machine to test with, so the only guarantees I can make are 1) CI passes, 2) a precompiled gem will be released.

In other words, if it isn't working for you on Windows, please help me.

-Aaron

Reply all
Reply to author
Forward
0 new messages