{"action":"created","issue":{"url":"https://api.github.com/repos/rails-school/school/issues/180","labels_url":"https://api.github.com/repos/rails-school/school/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/rails-school/school/issues/180/comments","events_url":"https://api.github.com/repos/rails-school/school/issues/180/events","html_url":"https://github.com/rails-school/school/issues/180","id":95222897,"number":180,"title":"500 error notifying subscribers","user":{"login":"btaitelb","id":549727,"avatar_url":"https://avatars.githubusercontent.com/u/549727?v=3","gravatar_id":"","url":"https://api.github.com/users/btaitelb","html_url":"https://github.com/btaitelb","followers_url":"https://api.github.com/users/btaitelb/followers","following_url":"https://api.github.com/users/btaitelb/following{/other_user}","gists_url":"https://api.github.com/users/btaitelb/gists{/gist_id}","starred_url":"https://api.github.com/users/btaitelb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btaitelb/subscriptions","organizations_url":"https://api.github.com/users/btaitelb/orgs","repos_url":"https://api.github.com/users/btaitelb/repos","events_url":"https://api.github.com/users/btaitelb/events{/privacy}","received_events_url":"https://api.github.com/users/btaitelb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-15T15:26:22Z","updated_at":"2015-07-15T17:03:14Z","closed_at":null,"body":"When I tried to notify subscribers about a recently created lesson ( https://www.railsschool.org/l/mean-testing ), I got a 500 internal server error and the following was in the logs. The emails did go out as far as I can tell, but the tweet did not.\r\n\r\n```\r\n2015-07-15T15:22:05.660434+00:00 heroku[router]: at=info method=POST path=\"/notify_subscribers/260\" host=www.railsschool.org request_id=81979c0e-d4ce-446b-b271-5c76756e29c3 fwd=\"2601:5c2:2:6500:fa16:54ff:fe7d:60b8,108.162.219.148\" dyno=web.1 connect=0ms service=1714ms status=500 bytes=906\r\n2015-07-15T15:22:05.639227+00:00 app[web.1]: PG::UndefinedTable: ERROR:  relation \"device_tokens\" does not exist\r\n2015-07-15T15:22:05.639234+00:00 app[web.1]: LINE 1: SELECT \"device_tokens\".* FROM \"device_tokens\"\r\n2015-07-15T15:22:05.639236+00:00 app[web.1]:                                       ^\r\n2015-07-15T15:22:05.639238+00:00 app[web.1]: : SELECT \"device_tokens\".* FROM \"device_tokens\"\r\n2015-07-15T15:22:05.639660+00:00 app[web.1]: Completed 500 Internal Server Error in 1673ms\r\n2015-07-15T15:22:05.645957+00:00 app[web.1]: \r\n2015-07-15T15:22:05.645964+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation \"device_tokens\" does not exist\r\n2015-07-15T15:22:05.645966+00:00 app[web.1]: LINE 1: SELECT \"device_tokens\".* FROM \"device_tokens\"\r\n2015-07-15T15:22:05.645968+00:00 app[web.1]:                                       ^\r\n2015-07-15T15:22:05.645969+00:00 app[web.1]: : SELECT \"device_tokens\".* FROM \"device_tokens\"):\r\n2015-07-15T15:22:05.645971+00:00 app[web.1]:   app/controllers/users_controller.rb:112:in `emit_lesson_notification_on_socket'\r\n2015-07-15T15:22:05.645974+00:00 app[web.1]:   app/controllers/users_controller.rb:45:in `notify_subscribers'\r\n```"},"comment":{"url":"https://api.github.com/repos/rails-school/school/issues/comments/121680570","html_url":"https://github.com/rails-school/school/issues/180#issuecomment-121680570","issue_url":"https://api.github.com/repos/rails-school/school/issues/180","id":121680570,"user":{"login":"acadet","id":6152745,"avatar_url":"https://avatars.githubusercontent.com/u/6152745?v=3","gravatar_id":"","url":"https://api.github.com/users/acadet","html_url":"https://github.com/acadet","followers_url":"https://api.github.com/users/acadet/followers","following_url":"https://api.github.com/users/acadet/following{/other_user}","gists_url":"https://api.github.com/users/acadet/gists{/gist_id}","starred_url":"https://api.github.com/users/acadet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acadet/subscriptions","organizations_url":"https://api.github.com/users/acadet/orgs","repos_url":"https://api.github.com/users/acadet/repos","events_url":"https://api.github.com/users/acadet/events{/privacy}","received_events_url":"https://api.github.com/users/acadet/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T17:03:14Z","updated_at":"2015-07-15T17:03:14Z","body":"I thought it was automatic. It should be ok from now on. I apologise for the inconvenience."}}