hello,

I am new to programming and am trying to create a clear_cache method.
This method is invoked when a submit button is pressed on a partial.

def clear_cache
    Dir.chdir('../../../../../') #This moves up to the appropriate
directory
    system('rake _0.7.3_ tmp:cache:clear')
    redirect_to 'http://127.0.0.1:3000/admin'
 end

The method is certainly being invoked as the redirect is working fine,
however, the method skips over the first two lines, no error messages
are appearing but the cache is not being cleared. if this method is
invoked in a seperate file in the same directory, using a call to the
method and the f5 button, the cache is clearing.

def clear_cache
    Dir.chdir('../../../../../')
    system('rake _0.7.3_ tmp:cache:clear')
    redirect_to 'http://127.0.0.1:3000/admin'
end

clear_cache

Am pretty confused as to why in our controller the first two lines are
being skipped over and would greatly appreciate any help i recieve with
this issue.

regards,
mike
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to