首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Rails 2.3.5运行Thinking时出现问题

使用Rails 2.3.5运行Thinking时出现问题
EN

Stack Overflow用户
提问于 2010-04-27 01:50:43
回答 3查看 4.5K关注 0票数 5

我刚刚安装了Sphinx (发行版: archlinux)并下载了源代码。然后我为Rails安装了“Then”插件。

我遵循了official page setupthis Screencast from Ryan Bates,但是当我尝试为模型建立索引时,它给出了这个错误:

代码语言:javascript
复制
$ 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文件:

代码语言:javascript
复制
devlopment:
searchd_binary_name: sphinx-searchd
indexer_binary_name: sphinx-indexer

但它显示了相同的错误,有什么想法吗?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2010-04-27 02:37:41

您需要在yaml文件bin_path: /usr/bin/sphinx-searchd中配置

票数 7
EN

Stack Overflow用户

发布于 2010-06-07 20:05:50

对于任何试图让Sphinx和thinking_sphinx在windows上工作的人来说,您的

代码语言:javascript
复制
config/sphinx.yml

应该看起来像这样:

代码语言:javascript
复制
development:
  bin_path: "C:/Sphinx/bin"
票数 3
EN

Stack Overflow用户

发布于 2012-04-26 21:03:52

有两件事可以帮助解决这个问题。首先,更新Thinking plugin/gem版本很有用。我在使用旧版本(1.3.16)的ThinkingSphinx时遇到了这个问题。在升级到Rails2的最新版本1.4.11之后,警告的数量变少了。您可以使用rake thinking_sphinx:version确定当前版本。可以使用以下命令更新插件版本

代码语言:javascript
复制
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插件不能确定哪个版本在本地运行时。

代码语言:javascript
复制
production:
  ..
  version: 2.0.4  # Version of Sphinx on remote server 192.168.1.4
  port: 9312  
  address: 192.168.1.4
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2715621

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档