如何使用 Ruby on Rails 在 Windows 7 上安装 Thinking Sphinx?
我不知道如何以正确的方式安装 Sphinx,以使其在 Windows 7 64x 计算机上与我的 Rails 应用程序一起运行。我关注了这个帖子: http://railsforum.com/viewtopic.php?id=29437 它说设置 PATH 变量,但这不起作用,它只会导致我的 git bash 路径搞砸并禁用其中的 ruby 命令。
当我启动 Rails 服务器时,我得到:
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
我的目录位置是 C:/Sphinx
但当我下载二进制文件时,配置文件 sphinx.yml
文件不存在 > http://sphinxsearch.com/downloads/beta/
Win32 binaries w/MySQL+PgSQL+libstemmer+id64 support 2.0.1-beta 5.6M
有人知道如何让它工作吗?
更新 1:
在 Rails 应用程序的 config/ 文件夹中创建文件 sphinx.yml 并将其放入到目前为止,但仍然没有运气:
config/sphinx.yml
development:
bin_path: "c:/Sphinx/bin"
更新 2:
好的,我重新安装了它现在得到这个错误:
Generating Configuration to C:/myapp/config/development.sphinx.conf
rake aborted!
Invalid Database Adapter: Sphinx only supports MySQL and PostgreSQL, not ActiveRecord::ConnectionAdapters::SQLite3Adapter
所以为了运行 Thinking Sphinx,我必须在开发中使用 MySql 或 PostgreSQL,而不是 SQLite3?
I am lost on how to install Sphinx in the correct way to get it running with my Rails application on a Windows 7 64x machine. I followed this thread: http://railsforum.com/viewtopic.php?id=29437 where it says to set the PATH Variable but that did not work, it only caused my git bash path to get screwed up and disable ruby commands in it.
When I start the rails server I get:
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
My directory location is C:/Sphinx
But the config file sphinx.yml
file doesn't exist when I download the binary > http://sphinxsearch.com/downloads/beta/
Win32 binaries w/MySQL+PgSQL+libstemmer+id64 support 2.0.1-beta 5.6M
Did anyone figure out how to get this working?
UPDATE 1:
Made the file sphinx.yml inside of my config/ folder of my Rails application and put this in their so far but still no luck:
config/sphinx.yml
development:
bin_path: "c:/Sphinx/bin"
UPDATE 2:
OK I reinstalled it and now get this error:
Generating Configuration to C:/myapp/config/development.sphinx.conf
rake aborted!
Invalid Database Adapter: Sphinx only supports MySQL and PostgreSQL, not ActiveRecord::ConnectionAdapters::SQLite3Adapter
So in order to run Thinking Sphinx I have to have MySql or PostgreSQL in development and not SQLite3?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保下载 MySQL,因为它不能与 SQlite3 数据库一起使用。考虑以下问题:
如何配置 PostgreSQL 或 MySQL 以使用 Sphinx 设置数据库?
如何使用 mysql 安装 Ruby on Rails 并使其正常工作,分步指南?
Make sure you download MySQL because yes, it does not work with SQlite3 Database. Take a at these questions:
How do I configure PostgreSQL or MySQL to set up a database with Sphinx?
How to install Ruby on Rails with mysql and get it working, a step by step guide?