Problem running Thinking Sphinx with Rails 2.3.5
Asked Answered
B

3

5

I just installed Sphinx (distro: archlinux) downloading the source. Then I installed "Thinking Sphinx" plugin for Rails.

I followed the official page setup and this Screencast from Ryan Bates, but when I try to index the models it gives me this error:

$ rake thinking_sphinx:index
(in /home/benoror/Dropbox/Proyectos/cotizahoy)

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
Generating Configuration to /home/benoror/Dropbox/Proyectos/cotizahoy/config/development.sphinx.conf
sh: indexer: command not found

I tried starting the daemon manually (/usr/bin/sphinx-searchd), changing the config/sphinx.yml file:

devlopment:
searchd_binary_name: sphinx-searchd
indexer_binary_name: sphinx-indexer

But it shows the same error, any ideas ?

Breadwinner answered 26/4, 2010 at 17:50 Comment(0)
I
7

you need to configure in your yaml file bin_path: /usr/bin/sphinx-searchd

Intersection answered 26/4, 2010 at 18:37 Comment(1)
i have proper bin path . but still its showing the same errorObau
B
3

For anybody trying to get Sphinx and thinking_sphinx working on windows, your

config/sphinx.yml

should look something like this:

development:
  bin_path: "C:/Sphinx/bin"
Bluegrass answered 7/6, 2010 at 12:5 Comment(0)
P
0

There are two things that help solving the problem. First, it is useful to update the Thinking Sphinx plugin/gem version. I had this problem with an older version (1.3.16) of ThinkingSphinx. After an update to the latest version for Rails 2, 1.4.11, the number of warnings was smaller. You can determine the current version with rake thinking_sphinx:version. It is possible to update the plugin version with

curl -L https://github.com/freelancing-god/thinking-sphinx/tarball/v1.4.11 \
  -o thinking-sphinx.tar.gz
tar -xvf thinking-sphinx.tar.gz -C plugins
mv plugins/* your_project/vendor/plugins/thinking-sphinx

Second, it is often helpful to specify the version of the Thinking Sphinx plugin/gem in the configuration file, especially if Sphinx is running on a remote server and the ThinkingSphinx plugin can not determine which Sphinx version is running locally.

production:
  ..
  version: 2.0.4  # Version of Sphinx on remote server 192.168.1.4
  port: 9312  
  address: 192.168.1.4
Panarabism answered 26/4, 2012 at 13:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.