Yaxm Yaxm
2007-Apr-22 05:45 UTC
[Ferret-talk] rename error using rebuild_index in console after searching
Hi, I use ruby console to experiment acts_as_ferret, but I ran into file rename error when I try to rebuild index after doing a search. is this normal? I am using Ferret 0.10.9 in windows XP. Loading development environment.>> Address.rebuild_index=> {}>> Address.find_by_contents(''US'')=> #<ActsAsFerret::SearchResults:0x4f2ffcc @total_hits=2, @results=[#<Address:0x 4f30198 @ferret_score=0.106434106826782, @ferret_rank=1, @attributes={"city"=>"" , "updated_at"=>"2007-04-16 01:32:40", "zipcode"=>"11111", "addressable_type"=>" User", "country"=>"US", "addressable_id"=>"1", "id"=>"1", "line_1"=>"", "line_2" =>"", "created_at"=>"2007-03-19 22:06:04", "state"=>"Alaska"}>, #<Address:0x4f30 06c @ferret_score=0.106434106826782, @ferret_rank=2, @attributes={"city"=>"san f ran", "updated_at"=>"2007-04-01 16:32:43", "zipcode"=>"94579", "addressable_type "=>"User", "country"=>"US", "addressable_id"=>"4", "id"=>"4", "line_1"=>"12", "l ine_2"=>"", "created_at"=>"2007-03-25 14:44:35", "state"=>"California"}>]>>> Address.rebuild_indexIOError: IO Error occured: couldn''t rename file "./script/../config/../config/../index/development/address\ _3.tmp" to "./script/../config/../config/../index/development/address\_3.cfs": < File exists> from C:/InstantRails-1.6-win/ruby/lib/ruby/gems/1.8/gems/ferret-0.10.9-m swin32/lib/ferret/index.rb:529:in `optimize'' from C:/InstantRails-1.6-win/ruby/lib/ruby/gems/1.8/gems/ferret-0.10.9-m swin32/lib/ferret/index.rb:529:in `optimize'' from C:/InstantRails-1.6-win/ruby/lib/ruby/1.8/monitor.rb:238:in `synchr onize'' from C:/InstantRails-1.6-win/ruby/lib/ruby/gems/1.8/gems/ferret-0.10.9-m swin32/lib/ferret/index.rb:527:in `optimize'' from ./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/l ocal_index.rb:51:in `rebuild_index'' from ./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/c lass_methods.rb:15:in `rebuild_index'' from (irb):3 Thanks. yaxm -- Posted via http://www.ruby-forum.com/.