无法在开发中连接到Sphinx MySQL

时间:2014-12-02 17:32:24

标签: mysql ruby-on-rails ruby ruby-on-rails-3 thinking-sphinx

我在我的Rails应用程序中安装了Thinking Sphinx。在Heroku中一切正常,但在本地我无法正常运行。

当我尝试运行rake ts:index时,我得到了

sh: indexer: command not found

当我尝试在应用程序中使用搜索功能时,我得到了

Error connecting to Sphinx via the MySQL protocol. Error connecting to Sphinx via the MySQL protocol. Can't connect to MySQL server on '127.0.0.1' (61) - SELECT * FROM `book_core` WHERE MATCH('economics') AND `sphinx_deleted` = 0 LIMIT 0, 20 OPTION field_weights=(title=16,author=7); SHOW META

感谢您的帮助!

1 个答案:

答案 0 :(得分:2)

听起来你没有安装Sphinx:

http://pat.github.io/thinking-sphinx/installing_sphinx.html

如果你安装了它但它仍然没有解决问题,那么可执行文件可能不在你的PATH环境变量中吗?