Found it!
My test database was missing the delta field.

Best,
J.

El jueves, 16 de octubre de 2014 10:49:50 UTC+2, J. Garcia escribió:
>
> I have had two models with delta indexes and all my spec tests running 
> fine.
> I decided to go with delta for a third one, and a lot of my spec tests 
> involving this third model are failing now.
>
> I do have in my spec_helper file:
>
>   config.before(:suite) do
>     ThinkingSphinx::Deltas.suspend!
>     DatabaseCleaner.clean_with :truncation
>   end
>
> I cannot see why I'm having these problems with this third model.
> Any help would be appreciated.
> Perhaps some tip for debugging and catching why 
> ThinkingSphinx::Deltas.suspend! is not taking effect with this one?
>
> Failure/Error: artifact.save!
>      NoMethodError:
> undefined method `delta=' for #<Artifact:0x00000008df5d10>
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activemodel-3.2.18/lib/active_model/attribute_methods.rb:407:in
>  
> `method_missing'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activerecord-3.2.18/lib/active_record/attribute_methods.rb:149:in
>  
> `method_missing'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/deltas/default_delta.rb:33:in
>  
> `toggle'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/active_record/callbacks/delta_callbacks.rb:23:in
>  
> `block in before_save'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/active_record/callbacks/delta_callbacks.rb:23:in
>  
> `each'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/active_record/callbacks/delta_callbacks.rb:23:in
>  
> `before_save'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/callbacks.rb:7:in
>  
> `block (2 levels) in callbacks'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in
>  
> `_callback_before_5'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:407:in
>  
> `_run__1449972784129710887__save__623683132733948804__callbacks'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in
>  
> `__run_callback'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in
>  
> `_run_save_callbacks'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in
>  
> `run_callbacks'
>      # 
> /home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activerecord-3.2.18/lib/active_record/callbacks.rb:264:in
>  
> `create_or_update'
>
>

-- 
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/d/optout.

Reply via email to