2011-06-18 37 views
4

我的狮身人面像的配置是:sphinx config ||配置/ sphinx.yml

================================ config/sphinx.yml 
development: 
    bin_path: "/usr/local/bin" 
    searchd_binary_name: searchd 
    indexer_binary_name: indexer 

,但每次我运行rake ts:index

Sphinx cannot be found on your system. You may need to configure the following 
settings in your config/sphinx.yml file: 
    * bin_path 
    * searchd_binary_name 
    * indexer_binary_name 

For more information, read the documentation: 
For more information, read the documentation: 
http://freelancing-god.github.com/ts/en/advanced_config.html 
Generating Configuration to config/development.sphinx.conf 
Sphinx 2.0.1-beta (r2792) 
Copyright (c) 2001-2011, Andrew Aksyonoff 
Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com) 

using config file 'config/development.sphinx.conf'... 
indexing index 'post_core'... 
collected 2 docs, 0.0 MB 
sorted 0.0 Mhits, 100.0% done 
total 2 docs, 675 bytes 
total 0.006 sec, 110510 bytes/sec, 327.43 docs/sec 
skipping non-plain index 'post'... 
total 6 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg 
total 12 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg 
rotating indices: succesfully sent SIGHUP to searchd (pid=19438). 
Generating Configuration to config/development.sphinx.conf 
Sphinx 2.0.1-beta (r2792) 
Copyright (c) 2001-2011, Andrew Aksyonoff 
Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com) 

using config file 'config/development.sphinx.conf'... 
indexing index 'post_core'... 
collected 2 docs, 0.0 MB 
sorted 0.0 Mhits, 100.0% done 
total 2 docs, 675 bytes 
total 0.006 sec, 105567 bytes/sec, 312.79 docs/sec 
skipping non-plain index 'post'... 
total 6 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg 
total 12 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg 
rotating indices: succesfully sent SIGHUP to searchd (pid=19438). 

那么,有什么问题呢?为什么即使安装了rake输出,它也找不到它?

回答

3

思维狮身人面像的警告肯定会更清晰......问题很可能是您的思维狮身人面像的版本有多大。较老的TS版本不知道Sphinx 2.0.x - 所以我建议升级到Thinking Sphinx的最新版本(Rails 1.2和2.x的1.4.6或Rails 3的2.0.5)。

1

我面临着同样的问题,无处不在寻找答案。

为我工作的诀窍是安装老版本的狮身人面像。 v.9而不是最新的测试版。

使用最新的思维狮身人面像与这个版本的狮身人面像解决了这个问题。

2

有两件事有助于解决这个问题。首先,如Pat所说,将Thinking Sphinx插件或gem更新为最新版本(Rails 2的1.4.x或Rails 3的2.0.x)是非常有用的。其次,它有时有助于specify the version of Sphinx在配置文件中(您可以通过调用“索引”找到它),特别是如果狮身人面像在远程服务器上运行,并思考狮身人面像没有获得当地的狮身人面像:

production: 
    .. 
    version: 2.0.4 # <------- Version of Sphinx on remote server 192.168.1.10 
    port: 9312 
    address: 192.168.1.10 
    .. 
相关问题