Search code examples
ruby-on-railsrubythinking-sphinx

ThinkingSphinx using RSpec, error: "Failed to start searchd daemon."


I have a problem with running Sphinx in test

As that was shown in the example ThinkingSphinx

I start the test with ThinkingSphinx::Test.start and end with ThinkingSphinx::Test.stop

The head section of test file contains

require 'thinking_sphinx/test'

ThinkingSphinx::Test.init

The error is

Failed to start searchd daemon. Check ...searchd.log.

Do you familiar with this?

Thanks!


Solution

  • Are you running Sphinx already in development? And if so, do you have a different port setting for the test environment in config/sphinx.yml? If not, then you'll need to do that, to ensure you can have two daemons running at once.