5

我剛安裝了獅身人面像(發行版:archlinux)下載源。然後,我安裝了Rails的「Thinking Sphinx」插件。問題運行思考獅身人面像與軌道2.3.5

我跟着official page setupthis Screencast from Ryan Bates,但是當我試圖指數模型它給了我這個錯誤:

$ rake thinking_sphinx:index 
(in /home/benoror/Dropbox/Proyectos/cotizahoy) 

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: 
http://freelancing-god.github.com/ts/en/advanced_config.html 
Generating Configuration to /home/benoror/Dropbox/Proyectos/cotizahoy/config/development.sphinx.conf 
sh: indexer: command not found 

我試圖手動啓動該守護進程(在/ usr/bin中/獅身人面像,searchd的),改變config/sphinx.yml文件:

devlopment: 
searchd_binary_name: sphinx-searchd 
indexer_binary_name: sphinx-indexer 

但它顯示相同的錯誤,任何想法?

回答

7

,你需要在你的YAML文件來配置bin_path: /usr/bin/sphinx-searchd

+2

我有適當的bin路徑。但仍然顯示相同的錯誤 – 2011-07-20 11:55:06

3

任何人試圖讓獅身人面像和thinking_sphinx在Windows上工作,你

config/sphinx.yml 

應該是這個樣子:

development: 
    bin_path: "C:/Sphinx/bin" 
0

有兩件事有助於解決問題。首先,更新思維獅身人面像插件/寶石版本很有用。我在ThinkingSphinx的舊版本(1.3.16)中遇到了這個問題。在更新Rails 2 1.4.11的最新版本之後,警告的數量更小。您可以使用rake thinking_sphinx:version來確定當前版本。這是可能的

curl -L https://github.com/freelancing-god/thinking-sphinx/tarball/v1.4.11 \ 
    -o thinking-sphinx.tar.gz 
tar -xvf thinking-sphinx.tar.gz -C plugins 
mv plugins/* your_project/vendor/plugins/thinking-sphinx 

二來更新插件版本,它往往是有幫助的指定配置文件中的思考獅身人面像插件/寶石的版本,特別是如果Sphinx is running on a remote server和ThinkingSphinx插件無法確定哪些獅身人面像版本在本地運行。

production: 
    .. 
    version: 2.0.4 # Version of Sphinx on remote server 192.168.1.4 
    port: 9312 
    address: 192.168.1.4