倾斜时思考狮身人面像错误 thinking_sphinx:start [英] thinking sphinx error when rake thinking_sphinx:start

查看:37
本文介绍了倾斜时思考狮身人面像错误 thinking_sphinx:start的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 gem 'thinking-sphinx', '2.0.10' 搜索功能.我正在关注 http://railscasts.com/episodes/120-thinking-sphinx 教程.

I am using gem 'thinking-sphinx', '2.0.10' for search functionality.I am following http://railscasts.com/episodes/120-thinking-sphinx tutorial for this.

script/plugin install git://github.com/freelancing-god/thinking-sphinx.git
rake thinking_sphinx:index

这 2 个步骤执行没有任何问题,但是当我做 rake thinking_sphinx:start 时,它给出了以下错误:

These 2 steps executed without any problem,but when i did rake thinking_sphinx:start it was giving following error :

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

我在网上搜索过这个问题,但即使尝试了很多解决方案,我也无法解决这个错误.此外,在网上检查时,我才知道配置中应该有 sphinx.yml 文件,而我的项目中不存在该文件.

I searched on net about this but even trying many solutions i am not able to solve this error.Also while checking on net i came to know that there should be sphinx.yml file in config which is not present in my project.

如何解决这个错误?

推荐答案

解决了...我只是在配置中添加了 sphinx.yml 文件,并为每个环境指定了端口号,如下所示:

solved it... i just added sphinx.yml file inside config and specified port number for each environment as follows:

development:
  port: 9310
  morphology: stem_en

test:
  port: 9310
  morphology: stem_en

production:
  port: 9310
  morphology: stem_en

然后将 development.sphinx.conf 中的监听地址更改为 searchd 如下:

then changed listen address in development.sphinx.conf for searchd as follows:

searchd
{
  listen = 127.0.0.1:9310
}

然后在控制台上运行命令:

then on console ran command:

rake thinking_sphinx:rebuild

这篇关于倾斜时思考狮身人面像错误 thinking_sphinx:start的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆