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.

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