1

新的 3.2 安装,调用 bundle exec rake ts:rebuild 或 bundle exec rake ts:index 操作失败并出现错误

ERROR: unknown key name 'workers' [...] development.sphinx.conf line 13 col 10.

为第 13 行生成的 development.sphinx.conf 文件。

  workers = threads

在检查文件后,我唯一的好奇心是关于监听端口:

listen = 127.0.0.1:9310:mysql41

以及模型索引调用的后续行

sql_host = localhost

边注。在 deploy.rb 中需要 'thinking_sphinx/deploy/capistrano' 建议将 ts 用作 gem 失败并出现错误(而省略 /deploy 部署):

/gems/capistrano-2.14.2/lib/capistrano/configuration/loading.rb:152:in `require': cannot load such file -- thinking_sphinx/deploy/capistrano (LoadError)

这有关系吗?

跟进

我注意到从版本 3 开始引入了工人。该机器目前正在为 rails 2.3.10 应用程序运行 sphinx v2。可比较的 sphinx2 文件不调用工作人员。所以看起来该应用程序正在尝试连接到 sphinx2。有没有办法同时运行 v2 和 v3?(注意:Sphinx3 版本在自己的端口上运行)。否则 sphinx2 版本的后果是什么,特别是如果在 rails 2 中开发?

4

1 回答 1

1

我建议在您的机器上将 Sphinx 升级到 2.0.6,然后在 Rails 2.3 应用程序中使用 Thinking Sphinx 1.5.0,在 Rails 3.2 应用程序中使用 Thinking Sphinx 3.0.3。您需要最新版本的 Sphinx(肯定是 2.0.6)以确保 Sphinx 理解“工人”设置。

于 2013-06-08T00:33:37.623 回答