I'm getting an error on configure:

Generating configuration to ~/myapp/config/development.sphinx.conf
rake aborted!
NoMethodError: undefined method `<<' for nil:NilClass
~/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/active_record/sql_source.rb:96:in
 
`block in append_presenter_to_attribute_array'
~/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/active_record/sql_source.rb:93:in
 
`each'
~/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/active_record/sql_source.rb:93:in
 
`append_presenter_to_attribute_array'
~/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/active_record/sql_source.rb:131:in
 
`prepare_for_render'
~/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/active_record/sql_source.rb:65:in
 
`render'


I have a few weird things going on in my setup that are (probably?) having 
an impact.

   1. My database is postgres has uuid primary keys
   2. I defined a custom field that generates a bigint in a before_create 
   callback called secondary_id -- this seemed like the best way to provide 
   sphinx with something it could index on but if this is the wrong way to go 
   about keeping my uuid primary keys i'm open to alternative suggestions
   3. I set secondary_id as the primary key for sphinx in the index 
   definition with the following code:
      1. ThinkingSphinx::Index.define :answer, with: :active_record, 
      primary_key: :proxy_id do ... end
      
I'm honestly not sure what's going on here -- I tried poking around in the 
code to sort out why this was happening and I tried guarding for nil on 
that line allows configuring to finish, but it predictably continues to 
explode during actual operation when I create a new instance of :answer -- 
I knew that was a longshot, but any help would be appreciated. I'm not 
particularly experienced with sphinx or thinking-sphinx, I inherited this 
project after it was already in place (the move to uuid primary keys is 
fairly recent, and this is the last major blocker) so just let me know if 
you need any additional info or context.

-- 
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 thinking-sphinx+unsubscr...@googlegroups.com.
To post to this group, send email to thinking-sphinx@googlegroups.com.
Visit this group at https://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Reply via email to