This was fixed over the weekend (unless you've updated since then, and I've screwed something up). I'm assuming you're using an old version of Rails? As later versions have the metaclass method built-in.
-- Pat On 03/08/2009, at 10:17 PM, morganick wrote: > > I have the search daemon running and indexing is picking up records; > however, when I run "i = Individual.search 'smith'" from the console, > I get the following error: > > NoMethodError: undefined method `metaclass' for #<Individual: > 0x1a1eea0> > from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/ > active_record/attribute_methods.rb:256:in `method_missing' > from /Users/anonymous/Sites/blah/crm/vendor/plugins/thinking-sphinx/ > lib/thinking_sphinx/search.rb:227:in `add_excerpter' > from /Users/anonymous/Sites/blah/crm/vendor/plugins/thinking-sphinx/ > lib/thinking_sphinx/search.rb:84:in `each' > from /Users/anonymous/Sites/blah/crm/vendor/plugins/thinking-sphinx/ > lib/thinking_sphinx/search.rb:84:in `send' > from /Users/anonymous/Sites/blah/crm/vendor/plugins/thinking-sphinx/ > lib/thinking_sphinx/search.rb:84:in `method_missing' > from /Users/anonymous/Sites/blah/crm/vendor/plugins/thinking-sphinx/ > lib/thinking_sphinx/search.rb:221:in `add_excerpter' > from /Users/anonymous/Sites/blah/crm/vendor/plugins/thinking-sphinx/ > lib/thinking_sphinx/search.rb:215:in `populate' > from /Users/anonymous/Sites/blah/crm/vendor/plugins/thinking-sphinx/ > lib/thinking_sphinx/search.rb:279:in `call' > from /Users/anonymous/Sites/blah/crm/vendor/plugins/thinking-sphinx/ > lib/thinking_sphinx/search.rb:279:in `retry_on_stale_index' > from /Users/anonymous/Sites/blah/crm/vendor/plugins/thinking-sphinx/ > lib/thinking_sphinx/search.rb:200:in `populate' > from /Users/anonymous/Sites/blah/crm/vendor/plugins/thinking-sphinx/ > lib/thinking_sphinx/search.rb:78:in `method_missing' > from /usr/local/lib/ruby/1.8/irb.rb:302:in `output_value' > from /usr/local/lib/ruby/1.8/irb.rb:151:in `eval_input' > from /usr/local/lib/ruby/1.8/irb.rb:263:in `signal_status' > from /usr/local/lib/ruby/1.8/irb.rb:147:in `eval_input' > from /usr/local/lib/ruby/1.8/irb.rb:146:in `eval_input' > from /usr/local/lib/ruby/1.8/irb.rb:70:in `start' > from /usr/local/lib/ruby/1.8/irb.rb:69:in `catch' > from /usr/local/lib/ruby/1.8/irb.rb:69:in `start' > from /usr/local/bin/irb:13>> > > I'm not sure really where to go from there.. my index block looks > like: > > # sphinx indexing > define_index do > indexes :last_name > end > > I have simplified it down as far as I can an I just can't get past > this one for some reason. Here is what I get when I index: > > indexing index 'individual_core'... > collected 4 docs, 0.0 MB > collected 0 attr values > sorted 0.0 Mvalues, 100.0% done > sorted 0.0 Mhits, 100.0% done > total 4 docs, 21 bytes > total 0.058 sec, 364.20 bytes/sec, 69.37 docs/sec > distributed index 'individual' can not be directly indexed; skipping. > Sphinx 0.9.8.1-release (r1533) > Copyright (c) 2001-2008, Andrew Aksyonoff > > using config file '/Users/anonymous/Sites/blah/crm/config/ > development.sphinx.conf'... > creating server socket on 127.0.0.1:3312 > Started successfully (pid 2684). > > Any suggestions? Seems like something isn't setup just right. > > Thanks in advance. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
