Forum: Ruby on Rails Ferret failing to rebuild_index - occasionally unable to del

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Richard L. (Guest)
on 2006-04-29 00:46
(Received via mailing list)
I'm switching all my fulltext searching over to ferret using the
acts_as_ferret plugin on windows (for development, will be deployed on
linux).

In my tests I have a setup method as follows to ensure the index is
reset for each test:

def setup
   Item.rebuild_index
end

This works fine for the initial few tests but then suddenly fails for
the last few tests when it seems to be failing to delete a file.

Loaded suite E:/rails/thatsprogress/test/unit/item_test
Started
........EEEE
Finished in 8.922 seconds.

   1) Error:
test_search_for_count(ItemTest):
Errno::EACCES: Permission denied -
E:/rails/thatsprogress/config/../index/test/Item/_j.cfs
....

Full trace included later.

It consistantly does it at this point, and looks like something is
stopping _j.cfs from being deleted.

Any ideas on what's going on and how to stop it?

Thanks in advance.



Full trace is as follows:

Loaded suite E:/rails/thatsprogress/test/unit/item_test
Started
........EEEE
Finished in 8.922 seconds.

   1) Error:
test_search_for_count(ItemTest):
Errno::EACCES: Permission denied -
E:/rails/thatsprogress/config/../index/test/Item/_j.cfs

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:105:in
`delete'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:105:in
`refresh'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:104:in
`each'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:123:in
`each'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:123:in
`each'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:104:in
`refresh'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:101:in
`synchronize'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:101:in
`refresh'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:74:in
`new'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:68:in
`synchronize'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/store/fs_store.rb:68:in
`new'

D:/programming/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.1/lib/ferret/index/index.rb:133:in
`initialize'

E:/rails/thatsprogress/config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:223:in
`new'

E:/rails/thatsprogress/config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:223:in
`rebuild_index'
     E:/rails/thatsprogress/test/unit/item_test.rb:15:in
`setup_without_fixtures'

E:/rails/thatsprogress/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:554:in
`setup'

E:/rails/thatsprogress/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:552:in
`setup'
This topic is locked and can not be replied to.