Unit and Functional Tests Bombing with Ferret

Hello,

I am currently using ferret 0.9.5 and acts_as_ferret 0.2.3 on windows XP

All my unit and functions test that used to work before I installed
ferret are erroring out. My index is on a model name Post, and it looks
like all tests that contains methods which does CRUD to the Post model
bombs out.

Is there anything special I need to do before running unit and
functional test?

Thanks for your help in advance!

Miguel

On Wed, Sep 20, 2006 at 03:31:13AM +0200, Miguel wrote:

functional test?
well, if you told us what errors you get, we could probably tell you
what the problem is :wink:

Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

Oops. sorry. Looks likes there is an EOFError. I have copied the entire
error output below (for a unit test)

Also, if I delete the test index directory, and then add a line in the
test that does some random Post.find_by_contents(’?’) before running the
test, it would work.

Thanks.

EOFError: EOFError
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/store/buffered_index_
io.rb:178:in refill' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/store/buffered_index_ io.rb:94:inread_byte’
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/store/index_io.rb:32:
in read_int' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/segment_term_en um.rb:22:ininitialize’
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/term_infos_io.r
b:122:in initialize' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/segment_reader. rb:29:ininitialize’
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/segment_reader.
rb:11:in get' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/index_reader.rb :117:inopen’
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/index_reader.rb
:116:in open' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/store/directory.rb:13 5:inwhile_locked’
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/index_reader.rb
:107:in open' c:/ruby/lib/ruby/1.8/monitor.rb:229:insynchronize’
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/index_reader.rb
:105:in open' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/index.rb:643:inensure_reader_open’
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/index.rb:650:in
ensure_searcher_open' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/index.rb:390:inquery_delete’
c:/ruby/lib/ruby/1.8/monitor.rb:229:in synchronize' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/index.rb:389:inquery_delete’
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/index.rb:293:in
<<' c:/ruby/lib/ruby/1.8/monitor.rb:229:insynchronize’
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/index/index.rb:258:in
<<' C:/_dev_alpha_3/src/woblo/config/../vendor/plugins/0.2.3/acts_as_ferret/lib/ acts_as_ferret.rb:510:inferret_update’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbac
ks.rb:344:in callback' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbac ks.rb:341:incallback’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbac
ks.rb:279:in update_without_timestamps' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/timesta mp.rb:39:inupdate’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb
:1718:in create_or_update_without_callbacks' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbac ks.rb:253:increate_or_update’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb
:1392:in save_without_validation' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/validat ions.rb:736:insave_without_transactions’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transac
tions.rb:126:in save' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connect ion_adapters/abstract/database_statements.rb:51:intransaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transac
tions.rb:91:in transaction' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transac tions.rb:118:intransaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transac
tions.rb:126:in save' ./test/unit/tagfield_test.rb:14:intest_tagfield’

Does anyone know why the EOFError is popping up? Thanks a bunch!

EOFError: EOFError
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/store/buffered_index_
io.rb:178:in refill' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/store/buffered_index_ io.rb:94:inread_byte’
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/store/index_io.rb:32:
in `read_int’

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs