Setting up Sphinx Search on remote server
If you are using sphinx gem for search functionality in your rails application, here is a quick rundown of commands that you will need to install and setup sphinx server and rails plugin on remote server.
Download and installl Sphinx package:
# download from http://sphinxsearch.com/downloads.html $ tar zxf <tar.gz file> $ ./configure $ make $ sudo make install
The rails app should already list gem dependency. Install the necessary gem on system:
# environment.rb: config.gem 'freelancing-god-thinking-sphinx', :lib => 'thinking_sphinx' $ sudo gem install freelancing-god-thinking-sphinx
Here are 2 rake commands to index the database for sphinx search. And to start the sphinx daemon when the app is running.
$ rake thinking_sphinx:index (have a cron job for this) $ rake thinking_sphinx:start (start the daemon)
There is also the capitate gem that makes managing sphinx on remote server easier.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.





