-->

thinking sphinx error when rake thinking_sphinx:st

2019-05-30 09:05发布

问题:

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

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

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.

How to solve this error?

回答1:

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

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


回答2:

May be /home/user/newsvn/alumnicell/log/searchd.log has solution for the problem.

Just post it!