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.
RAILS_ENV
? – Educatorybundle exec rake ts:index RAILS_ENV=staging
on staging – Educatory`rake ts:index`
fromrails console
? – Custommade`rake ts:index
` when you run it from within your app? For example, in a view, do<%=`rake ts:index`%>
. – Custommadecd /home/prog/OnlineAuto/Shop rake ts:rebuild
i get empty with rebuild pastebin.com/9scaKzgW – Raeleneraf