0

I am using my rails application in ubuntu12.04. I just installed thinkingsphinx and sphinx using these commands.

sudo apt-get install sphinxsearch    
sudo gem install thinking-sphinx

But thinking-sphinx version is 1.4.11 but i want 1.3.20. So i installed thinking-sphinx with version as 1.3.20. After that i started indexing through rake ts:index

But i am getting this error.

    rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
Please install RDoc 2.4.2+ to generate documentation.    
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    
rake aborted!    
uninitialized constant MysqlCompat::MysqlRes    
Tasks: TOP => environment
(See full trace by running task with --trace)

I searched regarding this issue.. and after that I modified my config/sphinx.yml file as

development:
  bin_path: "/usr/bin"
  searchd_binary_name: searchd
  indexer_binary_name: indexer
  port: 9110
  morphology: stem_en
  enable_star: true
  html_strip: 1
  min_infix_len: 2

and i installed sudo gem install mysql also.

Still the problem is not resolved..

Please can anyone suggest ideas to resolve this problem..

Thanks a lot in advance.

Padmaja
  • 13
  • 7
  • Is your sphinx server running? – Yunwei.W Jan 18 '13 at 10:42
  • Can u suggest me how to run the sphinx server? I did rake ts:index,rake ts:start,rake ts:configure,rake ts:rebuild... For every command i am getting the same error. – Padmaja Jan 18 '13 at 11:23
  • Try `$ sudo /etc/init.d/searchd start`. If it works, then run the rake tasks after that. – Yunwei.W Jan 18 '13 at 11:27
  • I gave `sudo /etc/init.d/searchd start` after that i got this output `sudo: /etc/init.d/searchd: command not found` – Padmaja Jan 18 '13 at 11:29
  • Try `ps aux | grep sphinx` see what you get. – Yunwei.W Jan 18 '13 at 11:31
  • I got this output `paddu 12669 0.0 0.0 4368 832 pts/1 S+ 17:01 0:00 grep --color=auto sphinx` – Padmaja Jan 18 '13 at 11:32
  • yep, so your sphinx server is not running. If you need thinking-shpinx work, you need sphinx server running for that. If you can't run `sudo /etc/init.d/searchd start`. Than maybe your sphinx is not installed properly. Or maybe you have to manually do some settings or whatever. I'm really not a linux guy, so maybe you have to google for that, sorry. – Yunwei.W Jan 18 '13 at 11:39
  • Previously i installed sphinx search alone. I will search for sphinx server and install it.Thank you for your help. – Padmaja Jan 18 '13 at 11:45
  • nah, The package is called sphinxsearch on unbuntu. try look for `/usr/bin/searchd`. if it exists thats the command. – Yunwei.W Jan 18 '13 at 11:54
  • I tried that wang.. I got this output /usr/bin/searchd `Sphinx 2.0.4-release (r3135) Copyright (c) 2001-2012, Andrew Aksyonoff Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com) FATAL: no readable config file (looked in /etc/sphinxsearch/sphinx.conf, ./sphinx.conf).` Is that means sphinx is installed in my machine? – Padmaja Jan 20 '13 at 04:06

1 Answers1

0

I think you need to run sphinx deamon. It can be done with sudo service sphinxsearch restart command. Try it.

Valdayka
  • 21
  • 2
  • I tried restarting the sphinxsearch.. I got this message in my console. `To enable sphinxsearch, edit /etc/default/sphinxsearch and set START=yes` In that file, I have start=no. Shall I edit that file with start=yes? – Padmaja Jan 20 '13 at 04:37
  • Yesterday why that message came I don't know, But today I got this message in console when I run `sudo service sphinxsearch restart` , `stop: Unknown instance: ` `sphinxsearch stop/pre-start, process 3624`. But still my sphinxsearch file contains start=no. Is this message indicates that my sphinx is running? – Padmaja Jan 21 '13 at 03:20
  • I think your sphinx deamon was running , and you only restart it :) Everything must work ok. – Valdayka Jan 21 '13 at 10:18
  • But if i am doing rake ts:index,it is asking `sphinx cannot found on your system` and asking to give bin_path and binary path. Can u tell how to restart the sphinx.? – Padmaja Jan 21 '13 at 16:49
  • Hm.. I think you can try to stop sphinx `sudo service sphinxsearch stop` command. And run deamon from your application rake `ts:start` – Valdayka Jan 24 '13 at 13:59
  • I gave `sudo service sphinxsearch stop` in the console i got this message `To enable sphinxsearch, edit /etc/default/sphinxsearch and set START=yes`.. So shall I update the start=yes? – Padmaja Jan 26 '13 at 17:57