searchlogic icon indicating copy to clipboard operation
searchlogic copied to clipboard

2.5 not compatible with thinking-sphinx

Open ledermann opened this issue 13 years ago • 3 comments

Since version 2.5 searchlogic can not be used in apps which uses the gem "ts-delayed_delta" from thinking-sphinx, too. On startup, this error message is raised:

Mysql::Error: Table 'myapp.jobs' doesn't exist: SHOW FIELDS FROM `jobs` (ActiveRecord::StatementInvalid)

It seems there is a bug in searchlogic (since 2.5, 2.4.32 is fine) handling AR models using set_table_name like ts-delayed_delta does: https://github.com/freelancing-god/ts-delayed-delta/blob/master/lib/thinking_sphinx/deltas/delayed_delta/job.rb

ledermann avatar Mar 09 '11 06:03 ledermann

I can't reproduce this. set_table_name is working fine for me. Can you tell me what to do to reproduce this? Or better yet, create a failing test that I can fix. Thanks.

ghost avatar Mar 09 '11 06:03 ghost

It seems it's an issue with the ordering of gems in the Gemfile: If searchlogic is the last gem defined, it all works fine. But if searchlogic is defined before ts-delayed-delta, the error occurs.

I can not reproduce it within an simple dummy application, perhaps it only occurs if another gem defines an AR model using set_table_name. You are right, it works fine if a model of the application uses set_table_name.

Sorry, I'm not able to create a failing test.

My environment: RubyGems 1.6.2, Bundler 1.0.10, Rails 2.3.11, Ruby 1.8.7-334, OS X

ledermann avatar Mar 09 '11 07:03 ledermann

Probably related to the pull request I just sent: https://github.com/freelancing-god/ts-delayed-delta/pull/14

moiristo avatar Oct 11 '11 10:10 moiristo