mysql - 运行时"Sphinx cannot be found on your system.""rake ts:index"

标签 mysql ruby-on-rails thinking-sphinx

我正在设置一台新机器 (OS X 10.6.7) 来运行一个使用 ThinkingSphinx 的 Rails 应用程序。我已按照安装说明进行操作,但仍然收到以下信息:

$ rake ts:index
(in /Users/robert/Projects/Office/code/office)
sh: line 1:  7050 Trace/BPT trap          indexer 2>&1
sh: line 1:  7053 Trace/BPT trap          indexer 2>&1

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
sh: line 1:  7055 Trace/BPT trap          indexer 2>&1
Generating Configuration to /Users/robert/Projects/Office/code/office/config/development.sphinx.conf
dyld: Library not loaded: libmysqlclient.18.dylib
  Referenced from: /usr/local/bin/indexer
  Reason: image not found

我读了here运行以下命令:

sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql

但我仍然遇到同样的错误。不确定这是否有帮助,但还有更多信息:

$ cd /usr/local/mysql/lib
$ ls
lib                        libmysqlclient_r.dylib
libmysqlclient.18.dylib    libmysqld-debug.a
libmysqlclient.a           libmysqld.a
libmysqlclient.dylib       libmysqlservices.a
libmysqlclient_r.18.dylib  mysql
libmysqlclient_r.a         plugin

从我的 config/sphinx.yml 中:

development:
  port: 9312
  enable_star: true
  min_prefix_len: 2
  html_strip: true
  bin_path: /usr/local/bin
production:
  port: 9312
  enable_star: true
  min_prefix_len: 2
  html_strip: true
  bin_path: /usr/local/bin

最佳答案

sphinx 索引引擎由一些二进制文件组成,例如,对于索引,它使用一个名为“indexer”的可执行文件。按照错误消息中的建议,尝试将 config/sphinx.yml 中的值设置为安装 sphinx 的路径。

关于mysql - 运行时"Sphinx cannot be found on your system.""rake ts:index",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6190435/

相关文章:

ruby-on-rails - Thinking Sphinx 重建索引 - 高 CPU 负载

php - MySQL 选择常量位于表数组中的位置

mysql - 在较少 verity 的索引上搜索是否更快?

ruby-on-rails - 如何在 Rails 中为不同的用户建模

ruby-on-rails - Sphinx - 何时对字段使用 'has' 和 'indexes'

ruby-on-rails - 显示相似用户

mysql - 随着我的 mysql 数据库的增长,我有什么选择

mysql - MySQL 查询从 3 个表中接收随机组合有点麻烦

ruby-on-rails - 如何在父类中进行验证,而不是在子类中进行验证

sql - Rails Nested 有条件地加入 Activerecord