The problem seems to be related to an attribute, though it’s a bit hard to tell 
which one… what I’d recommend is the following:

* Comment out all index definitions but one
* Run a rebuild
* If that works, uncomment out one of the other index definitions, repeat until 
you can confirm which index has the problem.
* Then with that index, comment out all attributes, and one-by-one uncomment 
them between rebuilds to detect the source of the problem.

Once you’ve got the attribute, if there’s nothing obviously wrong with it, 
share it here :)

— 
Pat

On 21 Nov 2013, at 2:39 am, C Wilson <[email protected]> wrote:

> When I run rake ts:rebuild I am getting a undefined method error. TS used to 
> work when I rebuild the index, however now when I try to do anything that's 
> the error that I get. Anyone have any ideas on how to fix?
> 
> Generating configuration to /config/development.sphinx.conf
> rake aborted!
> undefined method `klass' for nil:NilClass
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/attribute/type.rb:37:in
>  `block in associations'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/attribute/type.rb:35:in
>  `collect'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/attribute/type.rb:35:in
>  `associations'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/attribute/type.rb:48:in
>  `multi_from_associations'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/attribute/type.rb:9:in
>  `multi?'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/attribute.rb:4:in
>  `multi?'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/attribute/sphinx_presenter.rb:18:in
>  `collection_type'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/sql_source.rb:87:in
>  `block in append_presenter_to_attribute_array'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/sql_source.rb:84:in
>  `each'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/sql_source.rb:84:in
>  `append_presenter_to_attribute_array'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/sql_source.rb:122:in
>  `prepare_for_render'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/active_record/sql_source.rb:65:in
>  `render'
> /.rvm/gems/ruby-2.0.0-p0/gems/riddle-1.5.9/lib/riddle/configuration/index.rb:29:in
>  `block in render'
> /.rvm/gems/ruby-2.0.0-p0/gems/riddle-1.5.9/lib/riddle/configuration/index.rb:29:in
>  `collect'
> /.rvm/gems/ruby-2.0.0-p0/gems/riddle-1.5.9/lib/riddle/configuration/index.rb:29:in
>  `render'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/core/index.rb:49:in
>  `render'
> /.rvm/gems/ruby-2.0.0-p0/gems/riddle-1.5.9/lib/riddle/configuration.rb:39:in 
> `block in render'
> /.rvm/gems/ruby-2.0.0-p0/gems/riddle-1.5.9/lib/riddle/configuration.rb:39:in 
> `collect'
> /.rvm/gems/ruby-2.0.0-p0/gems/riddle-1.5.9/lib/riddle/configuration.rb:39:in 
> `render'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/configuration.rb:85:in
>  `render'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/configuration.rb:91:in
>  `block in render_to_file'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/configuration.rb:91:in
>  `render_to_file'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/rake_interface.rb:13:in
>  `configure'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/rake_interface.rb:24:in
>  `index'
> /.rvm/gems/ruby-2.0.0-p0/gems/thinking-sphinx-3.0.6/lib/thinking_sphinx/tasks.rb:9:in
>  `block (2 levels) in <top (required)>'
> /.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
> /.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'
> Tasks: TOP => ts:index
> (See full trace by running task with --trace)
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to