2

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!

Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
com
  • 2,606
  • 6
  • 29
  • 44

2 Answers2

3

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.

pat
  • 16,116
  • 5
  • 40
  • 46
  • great now it runs, but doesn't work. Sphinx doesn't see new records. I have ThinkingSphinx::Test.start at the begging of the test, ThinkingSphinx::Test.stop at the end, and ThinkingSphinx::Test.index after adding. But in debugger Sphinx doesn't see the new records – com Oct 18 '11 at 09:36
  • actually when I insert new records in describe before all section Sphinx works otherwise doesn't – com Oct 18 '11 at 12:32
  • Are you using transactions? Because Sphinx operates as a separate process, you can't use transactions in tests that use Sphinx. – pat Oct 18 '11 at 21:45
  • That is, you can't use transactional fixtures (transactions themselves are just part and parcel of MySQL and PostgreSQL). – pat Oct 18 '11 at 21:46
0

I was getting the same issue. My tmp folder was missing. It solved once i made it. Thanks

prashantsahni
  • 2,128
  • 19
  • 20