我刚刚安装了Sphinx (发行版: archlinux)并下载了源代码。然后我为Rails安装了“Then”插件。
我遵循了official page setup和this 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/sphinx-searchd),更改config/sphinx.yml文件:
devlopment:
searchd_binary_name: sphinx-searchd
indexer_binary_name: sphinx-indexer但它显示了相同的错误,有什么想法吗?
发布于 2010-04-27 02:37:41
您需要在yaml文件bin_path: /usr/bin/sphinx-searchd中配置
发布于 2010-06-07 20:05:50
对于任何试图让Sphinx和thinking_sphinx在windows上工作的人来说,您的
config/sphinx.yml应该看起来像这样:
development:
bin_path: "C:/Sphinx/bin"发布于 2012-04-26 21:03:52
有两件事可以帮助解决这个问题。首先,更新Thinking plugin/gem版本很有用。我在使用旧版本(1.3.16)的ThinkingSphinx时遇到了这个问题。在升级到Rails2的最新版本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其次,在配置文件中指定ThinkingSphinx plugin/gem的版本通常很有帮助,特别是当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.4https://stackoverflow.com/questions/2715621
复制相似问题