【问题标题】:Sphinx using postgreSQL and Rails on Mac OS X在 Mac OS X 上使用 postgreSQL 和 Rails 的 Sphinx
【发布时间】:2011-05-24 17:24:23
【问题描述】:

过去一天我一直在尝试解决这个问题,并认为对于那些了解 Sphinx 的人来说这是一个简单的问题。我在 /Users/gabemcmillan/src/sphinx-0.9.9/ 安装了 Sphinx,在我的 sphinx.yml 文件中我有下面的条目,这是另一篇文章所说的,但我不认为它是正确的 bin小路。我很困惑指向哪个 bin 路径。我检查了 spinx-0.9.9 目录并没有看到 bin 路径,所以我不知道指向哪里。

sphinx.yml 文件:

发展: bin_path: '/usr/local/bin'

我在尝试运行时遇到的错误:rake thinking_sphinx:index

在您的系统上找不到 Sphinx。您可能需要配置以下内容 config/sphinx.yml 文件中的设置: * bin_path * searchd_binary_name * indexer_binary_name

有关更多信息,请阅读文档: http://freelancing-god.github.com/ts/en/advanced_config.html 生成配置到 /Users/gabemcmillan/rails_projects/pa1/config/development.sphinx.conf sh: /usr/local/bin/indexer: 没有这样的文件或目录

【问题讨论】:

    标签: ruby-on-rails postgresql osx-snow-leopard sphinx


    【解决方案1】:

    当你说你已经在 /Users/gabemcmillan/src/sphinx-0.9.9 安装了 sphinx 时,我感觉你的意思是你在那里解压了它。您仍然需要构建和安装它。查看 /Users/gabemcmillan/src/sphinx-0.9.9doc/sphinx.html 以获取说明。顺便说一句,您可能需要安装可从雪豹安装盘获得的开发工具。

    【讨论】:

    • 嗨 Eelke,我按照这篇文章中的说明进行操作:mediumexposure.com/installing-sphinx-postgres-leopard-or-ubuntu 并且做了,除此之外还有其他步骤吗?:~% curl -O sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz ~% tar xzf sphinx-0.9 .8.1.tar.gz ~% cd sphinx-0.9.8.1 ~% export LDFLAGS="-L/usr/lib" ~% ./configure --prefix=/usr/local --with-pgsql --without-mysql ~% make ~% sudo make install
    • 然后它已经安装在 /usr/local 下(--prefix 选项)。所以 /usr/local/bin 是正确的路径。您应该能够在该路径中找到 indexer 和 searchd。如果它不存在,您可以尝试使用以下命令找到它:find / -name searchd
    • 我终于通过 Homebrew 重新安装了 postgreSQL 和 Sphinx 并指向了新的位置。现在可以了。希望我先从 Homebrew 开始,这样可以节省 2 天时间。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-03-18
    • 1970-01-01
    • 1970-01-01
    • 2013-04-27
    • 2013-11-05
    • 1970-01-01
    • 2016-08-15
    相关资源
    最近更新 更多