Pregunta

I have a rake task RAILS_ENV=production rake ts:index, which is executed every 3 hours by Cron, but nothing changes. When I call same query in the command line, nothing happened. And only when I call RAILS_ENV=production rake ts:rebuild, changes is applied. But why? Documentation said that ts:rebuild should be called if table structure is changed. But when only data rows is added, should be called ts:index. What could be wrong with it?

¿Fue útil?

Solución

My guess is Sphinx's command-line indexer tool is not available in the PATH for cron. I'd recommend setting the PATH environment variable within your cron configuration to include the folder wherever indexer is located (which can be found by running which indexer when you're logged in).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top