delete_all is failing with v1.2.0

  1. Hi Miika

    Ideally, I’d recommend upgrading thinking-sphinx to v4.0.0 and flying-sphinx to 2.1.2, because that’s going to be far more reliable with Rails 5.x. The changelogs and release notes are pretty thorough about any potential issues:
    https://github.com/pat/thinking-sphinx/blob/develop/CHANGELOG.markdown <https://github.com/pat/thinking-sphinx/blob/develop/CHANGELOG.markdown>
    https://github.com/pat/thinking-sphinx/releases/tag/v3.4.0 <https://github.com/pat/thinking-sphinx/releases/tag/v3.4.0>
    https://github.com/pat/thinking-sphinx/releases/tag/v4.0.0 <https://github.com/pat/thinking-sphinx/releases/tag/v4.0.0>
    https://github.com/flying-sphinx/flying-sphinx/blob/develop/CHANGELOG.markdown <https://github.com/flying-sphinx/flying-sphinx/blob/develop/CHANGELOG.markdown>

    Particularly in the case of flying-sphinx, I would expect upgrading to be a pretty simple affair. TS might be a little more complicated depending on how you’re using it.

    The flying-sphinx 1.x releases currently support Rails 2.x-4.x, and nominally 5.x, but as you’ve found out, this only works to a point. The patch supplied in the other conversation you’ve linked to will break Rails 2.x support - which I know is not really a big deal, but I’d rather keep the 1.x releases of flying-sphinx happy with those old Rails versions.

    Certainly, as a workaround you could fork flying-sphinx and apply this commit, and then you’ve got a version that works for you without going through the upgrading:
    https://github.com/flying-sphinx/flying-sphinx/commit/e1a1af4de52aa36600dcf543b5cac598856f42e1 <https://github.com/flying-sphinx/flying-sphinx/commit/e1a1af4de52aa36600dcf543b5cac598856f42e1>

    But from a long-term perspective, upgrading the gems is definitely the better approach if you’ve got the time.

    If you get stuck with any of this, do let me know.

    Regards,

    —
    Pat

  2. Thanks for the quick reply!
    I went with the fork option for now... was stuck for a while (not running "bundle install" locally to generate a new Gemfile.lock before pushing to Heroku). But I think it's working now.

    Off-topic and maybe a dumb question but on Heroku is fs:index and ts:index aliases? Should one prefer one over the other? Thanks again.

  3. It’s not a dumb question at all!

    If you’re using flying-sphinx 1.x or earlier, then you should use `fs:index`. It’s only since v2 that `ts:index` performs as expected no matter where you’re running it. Really, I should have taken this approach from the very beginning, because it’s been a source of confusion for a long time.

    But yes: flying-sphinx < v2: use `fs:index`. flying-sphinx >= v2: use `ts:index`.

  4. Wow, thanks for the heads up!
    Really glad I asked :)

Reply to this discussion Internal reply only staff will see it

Markdown

Attaching KB article:

» »

Read more…

Already uploaded files

  • error.png 13.8 KB
Attach files

Up to 10MB each.

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions