I have app, which run's on ubuntu 12.04, with nginx+passenger And in my method i try to rebuild sphinx index so:
def update_sphinx_index
Rails.application.load_tasks
Rake::Task['ts:rebuild'].invoke
redirect_to admin_mainpage_path
end
also i try:
`rake ts:index`
but nothing happend, sphinx index doesn't rebuild. What i do wrong? Maybe i need to do this with some privilegies, or something else, becouse when i do rake ts:rebuild in command terminal all is fine, and index rebuild.