5

ソースをダウンロードして Sphinx (ディストリビューション: archlinux) をインストールしました。次に、Rails 用の「Thinking Sphinx」プラグインをインストールしました。

公式ページのセットアップ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

config/sphinx.yml ファイルを変更して、デーモンを手動で開始してみました (/usr/bin/sphinx-searchd):

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

しかし、同じエラーが表示されます。アイデアはありますか?

4

3 に答える 3

7

yaml ファイルで設定する必要がありますbin_path: /usr/bin/sphinx-searchd

于 2010-04-26T18:37:41.477 に答える
3

Windows で Sphinx と think_sphinx を動作させようとしている人は、

config/sphinx.yml

次のようになります。

development:
  bin_path: "C:/Sphinx/bin"
于 2010-06-07T12:05:49.560 に答える
0

問題の解決に役立つことが 2 つあります。まず、Thinking Sphinx プラグイン/gem のバージョンを更新すると便利です。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

次に、構成ファイルで Thinking Sphinx プラグイン/gem のバージョンを指定すると、特にSphinx がリモート サーバーで実行されていて、ThinkingSphinx プラグインがローカルで実行されている Sphinx のバージョンを特定できない場合に役立ちます。

production:
  ..
  version: 2.0.4  # Version of Sphinx on remote server 192.168.1.4
  port: 9312  
  address: 192.168.1.4
于 2012-04-26T13:03:51.890 に答える