Rails,认为 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
这也是我的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
前几天我帮助某人解决了这个问题,结果发现实际上是另一个过时的插件导致了这个问题。也就是说,这里可能是其他东西......
为了调试,我建议注释掉所有
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?