{"action":"created","issue":{"url":"https://api.github.com/repos/fgrehm/letter_opener_web/issues/42","labels_url":"https://api.github.com/repos/fgrehm/letter_opener_web/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/fgrehm/letter_opener_web/issues/42/comments","events_url":"https://api.github.com/repos/fgrehm/letter_opener_web/issues/42/events","html_url":"https://github.com/fgrehm/letter_opener_web/issues/42","id":85163345,"number":42,"title":"DELETE routes are failing","user":{"login":"willian","id":19230,"avatar_url":"https://avatars.githubusercontent.com/u/19230?v=3","gravatar_id":"","url":"https://api.github.com/users/willian","html_url":"https://github.com/willian","followers_url":"https://api.github.com/users/willian/followers","following_url":"https://api.github.com/users/willian/following{/other_user}","gists_url":"https://api.github.com/users/willian/gists{/gist_id}","starred_url":"https://api.github.com/users/willian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willian/subscriptions","organizations_url":"https://api.github.com/users/willian/orgs","repos_url":"https://api.github.com/users/willian/repos","events_url":"https://api.github.com/users/willian/events{/privacy}","received_events_url":"https://api.github.com/users/willian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-04T16:06:52Z","updated_at":"2015-07-30T17:04:21Z","closed_at":null,"body":"Every time I tried to remove a message or clear all the messages I got this error:\r\n![error1](https://www.dropbox.com/s/589kdbrzh47sye3/Screenshot%202015-06-04%2013.04.04.png?dl=1)\r\n\r\nAt my router.rb I added:\r\n```ruby\r\nif Rails.env.development?\r\n  mount LetterOpenerWeb::Engine, at: '/letter_opener'\r\nend\r\n```\r\n\r\nAnd this is what I get when I run `rake routes`:\r\n```\r\n              letter_opener_web        /letter_opener                              LetterOpenerWeb::Engine\r\n                    sidekiq_web        /sidekiq                                    Sidekiq::Web\r\n                           root GET    /                                           redirect(301, http://gridleague-dev.com)\r\n\r\nRoutes for LetterOpenerWeb::Engine:\r\nclear_letters DELETE /clear(.:format)                 letter_opener_web/letters#clear\r\ndelete_letter DELETE /:id(.:format)                   letter_opener_web/letters#destroy\r\n      letters GET    /                                letter_opener_web/letters#index\r\n       letter GET    /:id(/:style)(.:format)          letter_opener_web/letters#show\r\n              GET    /:id/attachments/:file(.:format) letter_opener_web/letters#attachment\r\n```\r\n\r\nFor some reason it calls using `POST` but should use `DELETE` instead."},"comment":{"url":"https://api.github.com/repos/fgrehm/letter_opener_web/issues/comments/126402866","html_url":"https://github.com/fgrehm/letter_opener_web/issues/42#issuecomment-126402866","issue_url":"https://api.github.com/repos/fgrehm/letter_opener_web/issues/42","id":126402866,"user":{"login":"willian","id":19230,"avatar_url":"https://avatars.githubusercontent.com/u/19230?v=3","gravatar_id":"","url":"https://api.github.com/users/willian","html_url":"https://github.com/willian","followers_url":"https://api.github.com/users/willian/followers","following_url":"https://api.github.com/users/willian/following{/other_user}","gists_url":"https://api.github.com/users/willian/gists{/gist_id}","starred_url":"https://api.github.com/users/willian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willian/subscriptions","organizations_url":"https://api.github.com/users/willian/orgs","repos_url":"https://api.github.com/users/willian/repos","events_url":"https://api.github.com/users/willian/events{/privacy}","received_events_url":"https://api.github.com/users/willian/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T17:04:21Z","updated_at":"2015-07-30T17:04:21Z","body":"That failed on Chrome and Safari, the log says:\r\n```\r\nStarted POST \"/letter_opener/1438089424_07b115c\" for 127.0.0.1 at 2015-07-30 14:02:32 -0300\r\n[Rollbar] Reporting exception: No route matches [POST] \"/letter_opener/1438089424_07b115c\"\r\n[Rollbar] Scheduling payload\r\n[Rollbar] Sending payload\r\n[Rollbar] Got unexpected status code from Rollbar api: 400\r\n[Rollbar] Response: {\r\n  \"err\": 1,\r\n  \"message\": \"access token required\"\r\n}\r\n[Rollbar] Details: https://rollbar.com/instance/uuid?uuid=f8da38ee-a731-4d42-b092-f9eac380051b (only available if report was successful)\r\n[Rollbar] Exception uuid saved in env: f8da38ee-a731-4d42-b092-f9eac380051b\r\n\r\nActionController::RoutingError (No route matches [POST] \"/letter_opener/1438089424_07b115c\"):\r\n  .bundle/ruby/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'\r\n  .bundle/ruby/2.2.0/gems/rollbar-1.5.3/lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'\r\n  .bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\r\n  .bundle/ruby/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'\r\n  .bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/rack/logger.rb:38:in `call_app'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/rack/logger.rb:20:in `block in call'\r\n  .bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'\r\n  .bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged'\r\n  .bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/rack/logger.rb:20:in `call'\r\n  .bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\r\n  .bundle/ruby/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'\r\n  .bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\r\n  .bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/runtime.rb:18:in `call'\r\n  .bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\r\n  .bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'\r\n  .bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\r\n  .bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/lock.rb:17:in `call'\r\n  .bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\r\n  .bundle/ruby/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/static.rb:113:in `call'\r\n  .bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\r\n  .bundle/ruby/2.2.0/gems/rack-timeout-0.2.4/lib/rack/timeout.rb:108:in `call'\r\n  .bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:518:in `call'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:164:in `call'\r\n  .bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\r\n  .bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/content_length.rb:15:in `call'\r\n  .bundle/ruby/2.2.0/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process'\r\n  .bundle/ruby/2.2.0/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch'\r\n  .bundle/ruby/2.2.0/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process'\r\n  .bundle/ruby/2.2.0/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process'\r\n  .bundle/ruby/2.2.0/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data'\r\n  .bundle/ruby/2.2.0/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'\r\n  .bundle/ruby/2.2.0/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'\r\n  .bundle/ruby/2.2.0/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'\r\n  .bundle/ruby/2.2.0/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'\r\n  .bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/handler/thin.rb:19:in `run'\r\n  .bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/server.rb:286:in `start'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands/server.rb:80:in `start'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'\r\n  .bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'\r\n  /bin/rails:4:in `require'\r\n  /bin/rails:4:in `<main>'\r\n\r\n\r\n  Rendered .bundle/ruby/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.4ms)\r\n  Rendered .bundle/ruby/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb (16.2ms)\r\n  Rendered .bundle/ruby/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb (3.8ms)\r\n  Rendered .bundle/ruby/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (31.2ms)\r\n  Rendered .bundle/ruby/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.6ms)\r\n  Rendered .bundle/ruby/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (435.0ms)\r\n```\r\n\r\n![https://www.dropbox.com/s/hnqn8dsa3hp5bar/screencapture-api-gridleague-dev-com-letter_opener-1438089424_07b115c-1438275814641.png?dl=0](https://www.dropbox.com/s/hnqn8dsa3hp5bar/screencapture-api-gridleague-dev-com-letter_opener-1438089424_07b115c-1438275814641.png?dl=1)"}}