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 -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2006-Sep-20 06:22 UTC
[Ferret-talk] Unit and Functional Tests Bombing with Ferret
On Wed, Sep 20, 2006 at 03:31:13AM +0200, Miguel wrote:> 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?well, if you told us what errors you get, we could probably tell you what the problem is ;-) Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de 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:in `read_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:in `initialize''
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:in `initialize''
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:in `open''
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:in `while_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:in `synchronize''
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:in
`ensure_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:in
`query_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:in
`query_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:in `synchronize''
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:in `ferret_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:in `callback''
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:in `update''
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:in `create_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:in `save_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:in `transaction''
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:in `transaction''
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:in `test_tagfield''
--
Posted via http://www.ruby-forum.com/.
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:in `read_byte'' > c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.5/lib/ferret/store/index_io.rb:32: > in `read_int'' >.... -- Posted via http://www.ruby-forum.com/.