pat/ts-datetime-delta

undefined method `context' for ThinkingSphinx:Module

Closed this issue · 2 comments

@pat
I get the following error when trying to run the rake ts:in:delta task against the latest version of the Thinking Sphinx gem.

undefined method `context' for ThinkingSphinx:Module
/Users/dan/.rvm/gems/ruby-1.9.3-p385@waywire/bundler/gems/ts-datetime-delta-bf2b08014d1e/lib/thinking_sphinx/deltas/datetime_delta.rb:15:in `index'
/Users/dan/.rvm/gems/ruby-1.9.3-p385@waywire/bundler/gems/ts-datetime-delta-bf2b08014d1e/lib/thinking_sphinx/deltas/datetime_delta/tasks.rb:5:in `block (3 levels) in <top (required)>'

I'm using the following gems...

#THINKING SPHINX GEMS
thinking-sphinx, '3.0.3'
mysql2, '0.3.12b6' 
riddle, '1.5.6'
ts-datetime-delta, '1.0.3'

It seems that ThinkingSphinx.context is no longer a class method on the ThinkingSphinx class. I assume this will take a complete rewrite of the ts-datetime-delta gem, but if there is an easier fix for ~> 3.0.0, please let me know!

pat commented

Dan, your guess is correct - ts-datetime-delta hasn't been updated to work with Thinking Sphinx v3. At this point, I'm not sure it will be, given it's not a widely used gem. I'd welcome patches that change things so it does work in v3 though (indeed, if it's possible to get a version out that supports v1/v2/v3, like the new ts-delayed-delta, that'd be fantastic).

OK. Will do, thanks!