Skip to content

Instantly share code, notes, and snippets.

@garethrees
Last active November 6, 2019 10:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save garethrees/5f235bc25cfa00a612c370a300cfb8ac to your computer and use it in GitHub Desktop.
Xapain IOError DatabaseOpeningError Error opening table
vagrant@alaveteli-bionic64: ~/alaveteli
$ stat /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp/spelling.baseA
File: /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp/spelling.baseA
Size: 13 Blocks: 8 IO Block: 1048576 regular file
Device: 31h/49d Inode: 1657 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ vagrant) Gid: ( 1000/ vagrant)
Access: 2019-11-06 09:49:49.000000000 +0000
Modify: 2019-11-06 09:49:49.000000000 +0000
Change: 2019-11-06 09:49:49.000000000 +0000
Birth: -
vagrant@alaveteli-bionic64: ~/alaveteli
$ stat /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp/spelling.baseB
File: /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp/spelling.baseB
Size: 15 Blocks: 8 IO Block: 1048576 regular file
Device: 31h/49d Inode: 1667 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ vagrant) Gid: ( 1000/ vagrant)
Access: 2019-11-06 09:49:49.000000000 +0000
Modify: 2019-11-06 09:49:49.000000000 +0000
Change: 2019-11-06 09:49:49.000000000 +0000
Birth: -
Failures:
1) InfoRequest when emailing copes with indexing after item is deleted
Failure/Error: @@writable_db = Xapian::WritableDatabase.new(full_path, Xapian::DB_CREATE_OR_OPEN)
IOError:
DatabaseOpeningError: Error opening table `/home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test/spelling.':
Couldn't open /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test/spelling.baseA: No such file or directory
Couldn't open /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test/spelling.baseB: No such file or directory
# ./lib/acts_as_xapian/acts_as_xapian.rb:261:in `initialize'
# ./lib/acts_as_xapian/acts_as_xapian.rb:261:in `new'
# ./lib/acts_as_xapian/acts_as_xapian.rb:261:in `writable_init'
# ./lib/acts_as_xapian/acts_as_xapian.rb:704:in `update_index'
# ./spec/support/xapian_index.rb:21:in `update_xapian_index'
# ./spec/models/info_request_spec.rb:2153:in `block (3 levels) in <top (required)>'
2) InfoRequest InfoRequest when constructing a list of requests by query lists internal_review requests as unresolved ones
Failure/Error: raise "Failed to open Xapian database #{@@db_path}: #{e.message}"
RuntimeError:
Failed to open Xapian database /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp: DatabaseOpeningError: Error opening table `/home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp/spelling.':
Couldn't open /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp/spelling.baseA: No such file or directory
Couldn't open /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp/spelling.baseB: No such file or directory
# ./lib/acts_as_xapian/acts_as_xapian.rb:153:in `rescue in readable_init'
# ./lib/acts_as_xapian/acts_as_xapian.rb:149:in `readable_init'
# ./lib/acts_as_xapian/acts_as_xapian.rb:285:in `initialize_db'
# ./lib/acts_as_xapian/acts_as_xapian.rb:475:in `initialize'
# ./app/models/info_request.rb:1761:in `new'
# ./app/models/info_request.rb:1761:in `search_events'
# ./app/models/info_request.rb:583:in `request_list'
# ./spec/models/info_request_spec.rb:3466:in `apply_filters'
# ./spec/models/info_request_spec.rb:3567:in `block (3 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# IOError:
# DatabaseOpeningError: Error opening table `/home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp/spelling.':
# Couldn't open /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp/spelling.baseA: No such file or directory
# Couldn't open /home/vagrant/alaveteli/lib/acts_as_xapian/xapiandbs/test.temp/spelling.baseB: No such file or directory
# ./lib/acts_as_xapian/acts_as_xapian.rb:150:in `initialize'
Finished in 4 minutes 22.2 seconds (files took 8.05 seconds to load)
447 examples, 2 failures
Failed examples:
rspec ./spec/models/info_request_spec.rb:2146 # InfoRequest when emailing copes with indexing after item is deleted
rspec ./spec/models/info_request_spec.rb:3536 # InfoRequest InfoRequest when constructing a list of requests by query lists internal_review requests as unresolved ones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment