More likely, compatibility problem btwn me & the aforementioned gems.

Installed will_paginate 2.3.11, and got it working. Installed sphinx &
ts (1.2.8), got them working (or so I thought).  As soon as I changed
my model, and ran a ts:rebuild, suddenly am getting the following err
(from the server log):

"NoMethodError (undefined method `define_index' for #<Class:
0x26c56e0>):
  /Users/mo/.gem/ruby/1.8/gems/mislav-will_paginate-2.3.11/lib/
will_paginate/finder.rb:168:in `method_missing'
  app/models/plant.rb:55
  app/controllers/welcome_controller.rb:3:in `index' "

Get the same err if I fire up the console, and do a simple finder
call:

>> all = Plant.find(:all)

or...

>> one = Plant.first

Seems suddenly that will_paginate does not like the "define_index"
call in my (plant.rb) model.  Here it is the call:

  define_index do
    indexes binomial, :sortable => true
    indexes family, :sortable => true
    indexes bloom_season
    indexes wildlife_attracted
    indexes notes
    indexes common_names(:name), :as => :common_name, :sortable =>
true
  end

Note that the associations are all defined above define_index.   I
also tried substituting stopping ts, creating the index, and
restarting ts, instead of calling :rebuild.  Both approaches seem to
give the right feedback:

$ sudo rake ts:rebuild
(in /Users/mo/development/ruby/nativegardening)
Sphinx 0.9.8.1-release (r1533)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file '/Users/mo/development/ruby/nativegardening/config/
development.sphinx.conf'...
stop: succesfully sent SIGTERM to pid 7880
Stopped search daemon (pid 7880).
Generating Configuration to /Users/mo/development/ruby/nativegardening/
config/development.sphinx.conf
Sphinx 0.9.8.1-release (r1533)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file '/Users/mo/development/ruby/nativegardening/config/
development.sphinx.conf'...
indexing index 'plant_core'...
collected 307 docs, 0.0 MB
collected 0 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 307 docs, 26226 bytes
total 0.038 sec, 685736.69 bytes/sec, 8027.19 docs/sec
distributed index 'plant' can not be directly indexed; skipping.
Sphinx 0.9.8.1-release (r1533)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file '/Users/mo/development/ruby/nativegardening/config/
development.sphinx.conf'...
creating server socket on 127.0.0.1:3312
Started successfully (pid 7984).

Any ideas?

PS    ...commenting out the "define_index" call in the model of course
makes the problem go away, but that's obviously not a solution.  I had
this all working for the first session... it was properly searching in
the db!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to