使用 Rails 2.3.5 运行 Thinking Sphinx 时出现问题
我刚刚安装了 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
我尝试启动守护进程手动(/usr/bin/sphinx-searchd),更改 config/sphinx.yml 文件:
devlopment:
searchd_binary_name: sphinx-searchd
indexer_binary_name: sphinx-indexer
但它显示相同的错误,有什么想法吗?
I just installed Sphinx (distro: archlinux) downloading the source. Then I installed "Thinking Sphinx" plugin for Rails.
I followed the official page setup and this Screencast from Ryan Bates, but when I try to index the models it gives me this error:
$ 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
I tried starting the daemon manually (/usr/bin/sphinx-searchd), changing the config/sphinx.yml file:
devlopment:
searchd_binary_name: sphinx-searchd
indexer_binary_name: sphinx-indexer
But it shows the same error, any ideas ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要在 yaml 文件中配置
bin_path: /usr/bin/sphinx-searchd
you need to configure in your yaml file
bin_path: /usr/bin/sphinx-searchd
对于任何试图让 Sphinx 和thinking_sphinx 在 Windows 上工作的人来说,你
应该看起来像这样:
For anybody trying to get Sphinx and thinking_sphinx working on windows, your
should look something like this:
有两件事有助于解决问题。首先,更新 Thinking Sphinx 插件/gem 版本很有用。我在使用旧版本(1.3.16)的 ThinkingSphinx 时遇到了这个问题。 Rails 2 更新到最新版本 1.4.11 后,警告数量减少了。您可以使用
rakethinking_sphinx:version
确定当前版本。可以使用其次更新插件版本,在配置文件中指定 Thinking Sphinx 插件/gem 的版本通常很有帮助,特别是如果 Sphinx 正在远程服务器上运行,ThinkingSphinx 插件无法确定本地运行的是哪个 Sphinx 版本。
There are two things that help solving the problem. First, it is useful to update the Thinking Sphinx plugin/gem version. I had this problem with an older version (1.3.16) of ThinkingSphinx. After an update to the latest version for Rails 2, 1.4.11, the number of warnings was smaller. You can determine the current version with
rake thinking_sphinx:version
. It is possible to update the plugin version withSecond, it is often helpful to specify the version of the Thinking Sphinx plugin/gem in the configuration file, especially if Sphinx is running on a remote server and the ThinkingSphinx plugin can not determine which Sphinx version is running locally.