0
votes

I have installed sphinx and have done all necessary changes followed this steps wget http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz tar -xzf sphinx-0.9.9.tar.gz

After that, we should compile Sphinx from the source:

cd sphinx-0.9.9-rc2/ ./configure sudo make sudo make install

In Rails 3, open Gemfile in the root directory and add the line below:

gem 'thinking-sphinx', :git => 'http://github.com/freelancing-god/thinking-sph

And run the following command:

bundle install

Thinking Sphinx gem adds a few rake tasks to your application. The most important ones:

rake thinking_sphinx:index – Create the index rake thinking_sphinx:reindex – Reindex Sphinx without regenerating the configuration file rake thinking_sphinx:start – Start up Sphinx's daemon rake thinking_sphinx:stop – Shut down the daemon

but getting error FATAL: no indexes found in config file '/home/gvo/dcms/config/development.sphinx.conf' but when i run same with RAILS_ENV= production it works fine. Any suggestion or help would be really great.

1

1 Answers

0
votes

Yeah, those names are confusing. You need to make sure the ThinkingSphinx configuration in app/config/sphinx.yml (paths, what to index) is available to the TS gem for your environment. TS uses this config to generate the configuration used by the underlying Sphinx server. You may have to create needed directories for the indexer to be able to write index files, logs, and a few other things. It's likely that the config for development is different than production.