Ruby on rails 3.2 使用rails 3.2思考sphinx索引错误

Ruby on rails 3.2 使用rails 3.2思考sphinx索引错误,ruby-on-rails-3.2,indexing,thinking-sphinx,Ruby On Rails 3.2,Indexing,Thinking Sphinx,我在ubuntu 12.04中安装thinking sphinx时遇到问题 每当我运行rake ts:index时,我都会得到以下结果 Generating configuration to /home/tom/digmenu/config/development.sphinx.conf Sphinx 2.0.6-id64-release (r3473) Copyright (c) 2001-2012, Andrew Aksyonoff Copyright (c) 2008-2012, Sphi

我在ubuntu 12.04中安装thinking sphinx时遇到问题

每当我运行rake ts:index时,我都会得到以下结果

Generating configuration to /home/tom/digmenu/config/development.sphinx.conf
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/home/tom/digmenu/config/development.sphinx.conf'...
FATAL: no indexes found in config file '/home/tom/digmenu/config/development.sphinx.conf'
Generating configuration to /home/tom/digmenu/config/development.sphinx.conf
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/home/tom/digmenu/config/development.sphinx.conf'...
FATAL: no indexes found in config file '/home/tom/digmenu/config/development.sphinx.conf'
model.rb

定义索引do 索引:name,as::re_name 结束

sphinx的配置文件

indexer
{
}

searchd
{
  listen = 127.0.0.1:9306:mysql41
  log = /home/tom/digmenu/log/development.searchd.log
  query_log = /home/tom/digmenu/log/development.searchd.query.log
  pid_file = /home/tom/digmenu/log/development.sphinx.pid
  workers = threads
  binlog_path = /home/tom/digmenu/tmp/binlog/development
}
我完全不知道为什么这不起作用!该配置是在索引期间生成的,但已退出


有人知道吗

你可能已经解决了你的问题,但不管怎样还是来了。也许它会帮助别人

出现此问题的原因是您可能正在使用Thinking Sphinx 3.0或更高版本,但定义索引的方式很旧,就像Thinking Sphinx 2.*及更早版本中一样。索引定义不再位于模型本身中,而是位于单独的文件中,这些文件位于
app/index
中。还有很多其他的变化,所以最好仔细阅读新文档

3.0的文档位于自述文件中:


“官方”文档仍然是指旧版本,其工作原理不同:

您可能已经解决了您的问题,但还是这样。也许它会帮助别人

出现此问题的原因是您可能正在使用Thinking Sphinx 3.0或更高版本,但定义索引的方式很旧,就像Thinking Sphinx 2.*及更早版本中一样。索引定义不再位于模型本身中,而是位于单独的文件中,这些文件位于
app/index
中。还有很多其他的变化,所以最好仔细阅读新文档

3.0的文档位于自述文件中:

“官方”文档仍然是指旧版本,其工作原理不同: