我使用gem‘this sphinx’,'2.0.10‘来实现搜索功能。我遵循http://railscasts.com/episodes/120-thinking-sphinx教程来实现这一点。
script/plugin install git://github.com/freelancing-god/thinking-sphinx.git
rake thinking_sphinx:index执行这两个步骤没有任何问题,但是当我使用rake thinking_sphinx:start时,它给出了以下错误:
Failed to start searchd daemon. Check /home/user/newsvn/alumnicell/log/searchd.log.
Failed to start searchd daemon. Check /home/user/newsvn/alumnicell/log/searchd.log我在网上搜索了这一点,但即使尝试了许多解决方案,我也不能解决这个error.Also,当我在网上检查时,我才知道配置中应该有sphinx.yml文件,这在我的项目中不存在。
如何解决这个错误?
发布于 2012-05-29 13:36:30
解决了..。我只是在配置中添加了sphinx.yml文件,并为每个环境指定了端口号,如下所示:
development:
port: 9310
morphology: stem_en
test:
port: 9310
morphology: stem_en
production:
port: 9310
morphology: stem_en然后更改development.sphinx.conf中用于搜索的侦听地址,如下所示:
searchd
{
listen = 127.0.0.1:9310
}然后在控制台上运行命令:
rake thinking_sphinx:rebuild发布于 2012-05-28 17:25:45
也许/home/user/newsvn/alumnicell/log/searchd.log对这个问题有解决方案。
把它贴出来吧!
https://stackoverflow.com/questions/10782140
复制相似问题