I\'m finding that Thinking Sphinx sometimes errors out when I try to run its Rake tasks. Sometimes the tasks work fine, and sometimes I get errors like the one below.
I\
I guess after deploy by capistrano you didn't run rake thinking_sphinx:configure
it would generate sphinx config file in config/production.sphinx.conf
try add pidfile to config/sphinx.yml
production:
...
pid_file: "/tmp/searchd.pid"
it will make sure to find pid of searchd to kill
and added following code to config/deploy.rb
namespace :my_tasks do
task :generate_sphinx_config, :roles => [:web] do
run "cd #{latest_release} && RAILS_ENV=#{rails_env} bundle exec rake thinking_sphinx:configure"
end
end
....
after :deploy, "my_tasks:generate_sphinx_config"
to generate sphinx config file in each release folder