思考sphinx不生成配置文件

时间:2014-11-10 16:15:06

标签: ruby-on-rails-3.2 thinking-sphinx

将应用程序迁移到另一台服务器......在bundle exec rake ts:configure之后 耙子流产了! Errno :: ENOENT:没有这样的文件或目录 - 〜/ app / shared / config / development.sphinx.conf

sphinx.yml陈述

development:
  bin_path: /usr/local/bin
  searchd_file_path: ~/app/shared/sphinx
  use_64_bit: true
  enable_star: 1
  min_infix_len: 1
  max_matches: 10000
  port: 9313

thinking_sphinx.yml陈述

development:
  bin_path: /usr/local/bin
  pid_file: ~/app/shared/tmp/searchd.pid
  configuration_file: ~/app/shared/config/development.sphinx.conf
  indices_location: ~/app/shared/sphinx
  use_64_bit: true
  enable_star: true
  min_infix_len: 2
  max_matches: 1000
  mysql41: 9313
  mem_limit: 128M

我无法理解指出development.sphinx.conf不存在的消息,因为它应该是从rake任务创建的。

1 个答案:

答案 0 :(得分:0)

答案的两个组成部分:

1)制作绝对路径
2)Ubuntu上的索引器位于/usr/bin

development:
  bin_path: /usr/bin
  pid_file: /home/mainuser/app/shared/tmp/searchd.pid
  configuration_file: /home/mainuser/app/shared/config/development.sphinx.conf
  indices_location: /home/mainuser/app/shared/sphinx
[...]

答案仍然是部分的,因为索引捕获了0个文档,并且没有生成.sph文件。