Rails,认为 sphinx 配置任务不起作用...也没有输出

发布于 2024-10-13 19:11:25 字数 831 浏览 1 评论 0原文

我不明白,我想知道是否还有其他人在思考狮身人面像时遇到过类似的问题。

rails@myapp:~/apps/myapp/current$ rake ts:conf --trace RAILS_ENV="production"(in /home/rails/apps/myapp/releases/20110124214031)
** Invoke ts:conf (first_time)
** Invoke thinking_sphinx:configure (first_time)
** Invoke thinking_sphinx:app_env (first_time)
** Execute thinking_sphinx:app_env
** Invoke environment (first_time)
** Execute environment
** Execute thinking_sphinx:configure
Generating Configuration to /home/rails/apps/myapp/releases/20110124214031/config/production.sphinx.conf
Killed

这也是我的 sphinx.yml 的样子:

development:
  port: 9312
test:
  port: 9312
production:
  port: 9312
  pid_file: /var/run/sphinx/searchd.pid
  searchd_files: /home/rails/apps/myapp/shared/db/sphinx

它太烦人了,因为它曾经有效。有什么想法吗?

I don't get it, and I'm wondering if anyone else has had a similar problem with thinking sphinx.

rails@myapp:~/apps/myapp/current$ rake ts:conf --trace RAILS_ENV="production"(in /home/rails/apps/myapp/releases/20110124214031)
** Invoke ts:conf (first_time)
** Invoke thinking_sphinx:configure (first_time)
** Invoke thinking_sphinx:app_env (first_time)
** Execute thinking_sphinx:app_env
** Invoke environment (first_time)
** Execute environment
** Execute thinking_sphinx:configure
Generating Configuration to /home/rails/apps/myapp/releases/20110124214031/config/production.sphinx.conf
Killed

This is what my sphinx.yml looks like as well:

development:
  port: 9312
test:
  port: 9312
production:
  port: 9312
  pid_file: /var/run/sphinx/searchd.pid
  searchd_files: /home/rails/apps/myapp/shared/db/sphinx

It's soo annoying because it used to work. Any thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一页 2024-10-20 19:11:25

前几天我帮助某人解决了这个问题,结果发现实际上是另一个过时的插件导致了这个问题。也就是说,这里可能是其他东西......

为了调试,我建议注释掉所有 define_index 块,然后将它们一一添加回来,看看是否是特定的一个导致它。如果是这样,则注释掉所有字段和属性,然后将它们一一添加回来(尽管您需要从一个字段开始 - 否则 TS/Sphinx 会抱怨)。

否则,您使用的是哪个版本的 Rails 和 Thinking Sphinx?如果将其缩小到一个 Define_index 块,那么该块中有什么? block 所指的关联是什么(如果有)?

I helped someone with this problem the other day, and it turned out it was actually a different out-of-date plugin that was causing the issue. That said, could be something else here...

To debug, I'd recommend commenting out all define_index blocks, and add them back one by one, and see if it's one in particular that's causing it. If so, then comment out all fields and attributes, and add them back one by one (though you'll need one field to start with - otherwise TS/Sphinx complains).

Otherwise, what versions of Rails and Thinking Sphinx are you using? If you narrow it down to a define_index block, what's in that block? What are the associations that block refers to, if any?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文