Hi, I just installed ferret for the first time and integrated it with my app. On my dev machine it''s fine but on my production server I get this when I call find_by_contents(): Processing LinksController#results (for 24.185.105.59 at 2007-03-28 05:28:36) [POST] Session ID: 3f2dc7c17147c0e52178ba697a119833 Parameters: {"commit"=>"Search", "action"=>"results", "controller"=>"links", "link"=>{"search"=>"test"}} IOError (IO Error occured at <except.c>:93 in xraise Error occured in index.c:886 - sis_find_segments_file Error reading the segment infos. Store listing was ): /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:706:in `initialize'' /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:706:in `new'' /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:706:in `ensure_reader_open'' /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:713:in `ensure_searcher_open'' /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:658:in `process_query'' /usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'' /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:657:in `process_query'' /vendor/plugins/acts_as_ferret/lib/local_index.rb:87:in `find_id_by_contents'' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:82:in `find_id_by_contents'' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:134:in `ar_find_by_contents'' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:128:in `find_records_lazy_or_not'' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:54:in `find_by_contents'' /app/controllers/links_controller.rb:11:in `results'' -- Posted via http://www.ruby-forum.com/.
On Wed, Mar 28, 2007 at 12:31:12PM +0200, Alex Kane wrote:> Hi, > I just installed ferret for the first time and integrated it with my > app. On my dev machine it''s fine but on my production server I get this > when I call find_by_contents(): > > Processing LinksController#results (for 24.185.105.59 at 2007-03-28 > 05:28:36) [POST] > Session ID: 3f2dc7c17147c0e52178ba697a119833 > Parameters: {"commit"=>"Search", "action"=>"results", > "controller"=>"links", "link"=>{"search"=>"test"}} > > > IOError (IO Error occured at <except.c>:93 in xraise > Error occured in index.c:886 - sis_find_segments_file > Error reading the segment infos. Store listing was > > > ):Looks like the index can''t be created. a typical problem is that the user your application is running as does not have the privileges to create the index directory (RAILS_ROOT/index/production/model_name) and/or write to this directory. Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
I checked the permissions and I''m able to write to this path, so it must be something else. ~ Alex Jens Kraemer wrote:> On Wed, Mar 28, 2007 at 12:31:12PM +0200, Alex Kane wrote: >> >> >> IOError (IO Error occured at <except.c>:93 in xraise >> Error occured in index.c:886 - sis_find_segments_file >> Error reading the segment infos. Store listing was >> >> >> ): > > Looks like the index can''t be created. > > a typical problem is that the user your application is running as does > not have the privileges to create the index directory > (RAILS_ROOT/index/production/model_name) and/or write to this directory. > > Jens > > > -- > Jens Kr?mer > webit! Gesellschaft f?r neue Medien mbH > Schnorrstra?e 76 | 01069 Dresden > Telefon +49 351 46766-0 | Telefax +49 351 46766-66 > kraemer at webit.de | www.webit.de > > Amtsgericht Dresden | HRB 15422 > GF Sven Haubold, Hagen Malessa-- Posted via http://www.ruby-forum.com/.
On Wed, Mar 28, 2007 at 05:16:23PM +0200, Alex Kane wrote:> I checked the permissions and I''m able to write to this path, so it must > be something else.what happens if you run Model.rebuild_index on the console? Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
I also can''t run model.rebuild_index in the list action report io exception Jens Kraemer wrote:> On Wed, Mar 28, 2007 at 05:16:23PM +0200, Alex Kane wrote: >> I checked the permissions and I''m able to write to this path, so it must >> be something else. > > what happens if you run Model.rebuild_index on the console? > > Jens-- Posted via http://www.ruby-forum.com/.
>> what happens if you run Model.rebuild_index on the console?This is what I get: [alex at alexkane current]$ ./script/runner -e production Link.rebuild_index ./script/../config/../vendor/rails/railties/lib/commands/runner.rb:27: /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:285:in `delete'': File Not Found Error occured at <except.c>:93 in xraise (FileNotFoundError) Error occured in fs_store.c:329 - fs_open_input tried to open "script/../config/../index/production/link/_h8.frq" but it doesn''t exist: <No such file or directory> from /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:285:in `<<'' from /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:8:in `synchrolock'' from /usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'' from /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:8:in `synchrolock'' from /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:267:in `<<'' from ./script/../config/../vendor/plugins/acts_as_ferret/lib/local_index.rb:220:in `reindex_model'' from ./script/../config/../vendor/plugins/acts_as_ferret/lib/local_index.rb:219:in `each'' from ./script/../config/../vendor/plugins/acts_as_ferret/lib/local_index.rb:219:in `reindex_model'' ... 10 levels... from ./script/runner:3:in `eval'' from ./script/../config/../vendor/rails/railties/lib/commands/runner.rb:27 from ./script/runner:3:in `require'' from ./script/runner:3 -- Posted via http://www.ruby-forum.com/.
On Sun, Apr 01, 2007 at 12:49:29AM +0200, Alex Kane wrote:> >> what happens if you run Model.rebuild_index on the console? > > This is what I get: > > [alex at alexkane current]$ ./script/runner -e production > Link.rebuild_index > ./script/../config/../vendor/rails/railties/lib/commands/runner.rb:27: > /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:285:in > `delete'': File Not Found Error occured at <except.c>:93 in xraise > (FileNotFoundError) > Error occured in fs_store.c:329 - fs_open_input > tried to open > "script/../config/../index/production/link/_h8.frq" but it doesn''t > exist: <No such file or directory>Are you sure your app has not been trying to write to the index while rebuilding? Does deleting the index dir before reindexing help? -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa