Search code examples
ruby-on-railspostgresqlsphinxthinking-sphinx

Thinking Sphinx mistakenly looks for mysql instead of postgresql


My database.yml file and my Gemfile specify the use of postgresql. However, when I run

rake ts:index 

I get the error

rake aborted!
cannot load such file -- mysql2

Why is Thinking Sphinx looking for mysql?


Solution

  • mysql2 gem is required for connecting to Sphinx, so please include it even if you're using PostgreSQL as your database.

    Reference: https://github.com/pat/thinking-sphinx