我尝试在我的新服务器上安装带有 Rails 3.0.1 的 sphinx。
我总是得到这个:
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
或
一些谜语错误。
首先我尝试通过 ubuntu 软件包:
sudo apt-get install sphinxsearch
这没有帮助,所以我尝试从网站加载它并自己编译。
我可以执行:
RAILS_ENV=production rake ts:rebild
我找到了它:
whereis searchd searchd: /usr/local/bin/searchd
但是 crontab -e 无法执行重建方法...
此外,购买尝试手动启动 searchd 也会出现此错误:
searchd --pidfile --config/var/www/config/development.sphinx.conf Sphinx 2.1.1-beta (rel21-r3701) 版权所有 (c) 2001-2013,安德鲁·阿克肖诺夫 版权所有 (c) 2008-2013,Sphinx Technologies Inc ( http://sphinxsearch.com )
使用配置文件“/var/www/config/development.sphinx.conf”... 警告:/var/www/config/development.sphinx.conf 第 8 行中已弃用键“address”;使用“听”来代替。 警告:/var/www/config/development.sphinx.conf 第 9 行中已弃用关键“port”;使用“听”来代替。 致命:无法锁定 pid 文件“/var/www/log/searchd.production.pid”:资源暂时不可用(searchd 已在运行?)
谢谢!!!祝周末愉快!
最佳答案
ThinkinSphinx 在/usr/bin/处查找 searchd 和索引器,因此我创建了到/usr/local/bin/searchd 和/usr/local/bin/indexer 的符号链接(symbolic link)并正常工作。
sudo ln -s /usr/local/bin/searchd /usr/bin/searchd
sudo ln -s /usr/local/bin/indexer /usr/bin/indexer
问候
关于ruby-on-rails - ThinkinSphinx - 未找到 - 在您的系统上找不到 Sphinx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16612348/