I just did an initial deploy to Heroku of a Rails 4 app that uses Devise for authentication. Signing out works locally, but Heroku returns an error that "The page you were looking for does not exist," and it doesn't log the user out.
Based on the Heroku logs and a Google/SO search, it looks like the reason is that Heroku is using a GET request instead of DELETE - though my app code specifies the :delete method for the link, and Devise uses DELETE for signing out by default. Some articles suggested that Heroku uses GET so that users can sign out without having JavaScript enabled, but I have the JS include tag in my code and JS is enabled in my browser. (I've checked using both Chrome and Safari.)
I've found instructions for changing the configuration so that Devise uses :get instead of :delete, but I would prefer to use the more secure :delete method if at all possible.
Thanks for the ideas so far. In response to your questions:
Here is my link:
<%= link_to "Log out", destroy_admin_session_path, method: :delete %>
This is what I have in the head tag to load the javascript:
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
There are no JS errors reported in the console.