cURL DELETE token authentication

I would like to do REST API for the server in RoR which will be used by
mobile application, I described my problem in details on stack.

http://stackoverflow.com/questions/24092791/ruby-on-rails-curl-delete-token-authentication

What is incorrectly, because I analyzed the entire program and I cannot
find the cause of the error ?