2017-03-10 8 views
0

Ich habe ein Problem mit meiner Webanwendung, nachdem ich von Ruby on Rails nach Heroku weitergeleitet wurde. Wenn ich meine Anwendung innerhalb der cloud9 ide ausprobiere, öffnet sie sich und funktioniert perfekt. Allerdings, wenn ich versuche, es zu öffnen, nachdem alle Zweige an die Master-Zusammenführung und sowohl den Master drängen git und Heroku ich dieses:So überprüfen Sie den Fehler für Heroku

https://limitless-fortress-32820.herokuapp.com/

Ich bin nicht sicher, wie dies zu beheben. Irgendein Rat?

Dies ist, was die Protokolle sagen:

2017-03-11T02:43:48.982178+00:00 app[web.1]: D, [2017-03-11T02:43:48.982112 #4] DEBUG -- : [9828508f-52fc-489a-9bda-d680b05f1c28] Plan Load (0.7ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] 
2017-03-11T02:43:48.983225+00:00 app[web.1]: D, [2017-03-11T02:43:48.983167 #4] DEBUG -- : [9828508f-52fc-489a-9bda-d680b05f1c28] Plan Load (0.6ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] 
2017-03-11T02:43:48.983770+00:00 app[web.1]: I, [2017-03-11T02:43:48.983713 #4] INFO -- : [9828508f-52fc-489a-9bda-d680b05f1c28] Completed 404 Not Found in 3ms (ActiveRecord: 1.4ms) 
2017-03-11T02:43:48.984196+00:00 app[web.1]: F, [2017-03-11T02:43:48.984142 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28] 
2017-03-11T02:43:48.984248+00:00 app[web.1]: F, [2017-03-11T02:43:48.984196 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3): 
2017-03-11T02:43:48.984296+00:00 app[web.1]: F, [2017-03-11T02:43:48.984249 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28] 
2017-03-11T02:43:48.984347+00:00 app[web.1]: F, [2017-03-11T02:43:48.984296 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28] app/controllers/pages_controller.rb:5:in `home' 
2017-03-11T03:20:33.758477+00:00 heroku[web.1]: Idling 
2017-03-11T03:20:33.759144+00:00 heroku[web.1]: State changed from up to down 
2017-03-11T03:20:34.554844+00:00 heroku[web.1]: Stopping all processes with SIGTERM 
2017-03-11T03:20:34.566891+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish 
2017-03-11T03:20:34.566983+00:00 app[web.1]: === puma shutdown: 2017-03-11 03:20:34 +0000 === 
2017-03-11T03:20:34.566987+00:00 app[web.1]: - Goodbye! 
2017-03-11T03:20:34.567392+00:00 app[web.1]: Exiting 
2017-03-11T03:20:34.775834+00:00 heroku[web.1]: Process exited with status 0 
2017-03-11T05:25:57.075991+00:00 heroku[web.1]: Unidling 
2017-03-11T05:25:57.076291+00:00 heroku[web.1]: State changed from down to starting 
2017-03-11T05:26:01.138390+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 56896 -e production` 
2017-03-11T05:26:06.849508+00:00 app[web.1]: => Booting Puma 
2017-03-11T05:26:06.849544+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:56896 
2017-03-11T05:26:06.849552+00:00 app[web.1]: => Run `rails server -h` for more startup options 
2017-03-11T05:26:07.935302+00:00 app[web.1]: Puma starting in single mode... 
2017-03-11T05:26:07.935323+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl 
2017-03-11T05:26:07.935324+00:00 app[web.1]: * Min threads: 5, max threads: 5 
2017-03-11T05:26:07.935325+00:00 app[web.1]: * Environment: production 
2017-03-11T05:26:07.935466+00:00 app[web.1]: * Listening on tcp://0.0.0.0:56896 
2017-03-11T05:26:07.935709+00:00 app[web.1]: Use Ctrl-C to stop 
2017-03-11T05:26:08.316445+00:00 heroku[web.1]: State changed from starting to up 
2017-03-11T05:26:11.211047+00:00 app[web.1]: I, [2017-03-11T05:26:11.210942 #4] INFO -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Started HEAD "/" for 184.72.76.14 at 2017-03-11 05:26:11 +0000 
2017-03-11T05:26:11.214433+00:00 app[web.1]: I, [2017-03-11T05:26:11.214374 #4] INFO -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Processing by PagesController#home as HTML 
2017-03-11T05:26:11.243975+00:00 app[web.1]: D, [2017-03-11T05:26:11.243829 #4] DEBUG -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Plan Load (0.9ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] 
2017-03-11T05:26:11.257064+00:00 app[web.1]: D, [2017-03-11T05:26:11.256920 #4] DEBUG -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Plan Load (0.7ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] 
2017-03-11T05:26:11.257752+00:00 app[web.1]: I, [2017-03-11T05:26:11.257692 #4] INFO -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Completed 404 Not Found in 43ms (ActiveRecord: 7.9ms) 
2017-03-11T05:26:11.258611+00:00 app[web.1]: F, [2017-03-11T05:26:11.258542 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd] 
2017-03-11T05:26:11.258689+00:00 app[web.1]: F, [2017-03-11T05:26:11.258627 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3): 
2017-03-11T05:26:11.258744+00:00 app[web.1]: F, [2017-03-11T05:26:11.258692 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd] 
2017-03-11T05:26:11.258855+00:00 app[web.1]: F, [2017-03-11T05:26:11.258746 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd] app/controllers/pages_controller.rb:5:in `home' 
2017-03-11T05:26:11.258728+00:00 heroku[router]: at=info method=HEAD path="/" host=limitless-fortress-32820.herokuapp.com request_id=d795b023-4103-41a2-8825-ecb50be24fdd fwd="184.72.76.14" dyno=web.1 connect=12ms service=118ms status=404 bytes=180 protocol=https 
2017-03-11T05:58:12.552944+00:00 heroku[web.1]: Idling 
2017-03-11T05:58:12.553609+00:00 heroku[web.1]: State changed from up to down 
2017-03-11T05:58:13.333628+00:00 heroku[web.1]: Stopping all processes with SIGTERM 
2017-03-11T05:58:13.379474+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish 
2017-03-11T05:58:13.379914+00:00 app[web.1]: === puma shutdown: 2017-03-11 05:58:13 +0000 === 
2017-03-11T05:58:13.379919+00:00 app[web.1]: - Goodbye! 
2017-03-11T05:58:13.380079+00:00 app[web.1]: Exiting 
2017-03-11T05:58:13.710764+00:00 heroku[web.1]: Process exited with status 0 
2017-03-11T07:27:27.616986+00:00 heroku[web.1]: Unidling 
2017-03-11T07:27:27.617784+00:00 heroku[web.1]: State changed from down to starting 
2017-03-11T07:27:30.484604+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 53485 -e production` 
2017-03-11T07:27:34.063443+00:00 app[web.1]: => Booting Puma 
2017-03-11T07:27:34.063485+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:53485 
2017-03-11T07:27:34.063487+00:00 app[web.1]: => Run `rails server -h` for more startup options 
2017-03-11T07:27:34.745431+00:00 app[web.1]: Puma starting in single mode... 
2017-03-11T07:27:34.745451+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl 
2017-03-11T07:27:34.745452+00:00 app[web.1]: * Min threads: 5, max threads: 5 
2017-03-11T07:27:34.745453+00:00 app[web.1]: * Environment: production 
2017-03-11T07:27:34.745551+00:00 app[web.1]: * Listening on tcp://0.0.0.0:53485 
2017-03-11T07:27:34.745760+00:00 app[web.1]: Use Ctrl-C to stop 
2017-03-11T07:27:35.323498+00:00 heroku[web.1]: State changed from starting to up 
2017-03-11T07:27:36.716062+00:00 heroku[router]: at=info method=GET path="/" host=limitless-fortress-32820.herokuapp.com request_id=3034176c-dd58-4af0-8f70-745f440273db fwd="125.62.127.212" dyno=web.1 connect=0ms service=67ms status=404 bytes=1744 protocol=https 
2017-03-11T07:27:36.683610+00:00 app[web.1]: I, [2017-03-11T07:27:36.683527 #4] INFO -- : [3034176c-dd58-4af0-8f70-745f440273db] Started GET "/" for 125.62.127.212 at 2017-03-11 07:27:36 +0000 
2017-03-11T07:27:36.686611+00:00 app[web.1]: I, [2017-03-11T07:27:36.686528 #4] INFO -- : [3034176c-dd58-4af0-8f70-745f440273db] Processing by PagesController#home as HTML 
2017-03-11T07:27:36.705959+00:00 app[web.1]: D, [2017-03-11T07:27:36.705867 #4] DEBUG -- : [3034176c-dd58-4af0-8f70-745f440273db] Plan Load (0.6ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] 
2017-03-11T07:27:36.715238+00:00 app[web.1]: D, [2017-03-11T07:27:36.715149 #4] DEBUG -- : [3034176c-dd58-4af0-8f70-745f440273db] Plan Load (2.1ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] 
2017-03-11T07:27:36.715738+00:00 app[web.1]: I, [2017-03-11T07:27:36.715679 #4] INFO -- : [3034176c-dd58-4af0-8f70-745f440273db] Completed 404 Not Found in 29ms (ActiveRecord: 8.8ms) 
2017-03-11T07:27:36.716195+00:00 app[web.1]: F, [2017-03-11T07:27:36.716134 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db] 
2017-03-11T07:27:36.716273+00:00 app[web.1]: F, [2017-03-11T07:27:36.716193 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3): 
2017-03-11T07:27:36.716324+00:00 app[web.1]: F, [2017-03-11T07:27:36.716271 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db] 
2017-03-11T07:27:36.716375+00:00 app[web.1]: F, [2017-03-11T07:27:36.716321 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db] app/controllers/pages_controller.rb:5:in `home' 
2017-03-11T07:27:37.337320+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=limitless-fortress-32820.herokuapp.com request_id=20bb1588-0933-4517-9605-0fdac9f274af fwd="125.62.127.212" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https 
2017-03-11T08:01:45.234016+00:00 heroku[web.1]: Idling 
2017-03-11T08:01:45.234777+00:00 heroku[web.1]: State changed from up to down 
2017-03-11T08:01:46.059828+00:00 heroku[web.1]: Stopping all processes with SIGTERM 
2017-03-11T08:01:46.113060+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish 
2017-03-11T08:01:46.113197+00:00 app[web.1]: === puma shutdown: 2017-03-11 08:01:46 +0000 === 
2017-03-11T08:01:46.113203+00:00 app[web.1]: - Goodbye! 
2017-03-11T08:01:46.113318+00:00 app[web.1]: Exiting 
2017-03-11T08:01:46.472377+00:00 heroku[web.1]: Process exited with status 0 
2017-03-11T16:26:53.013220+00:00 heroku[web.1]: Unidling 
2017-03-11T16:26:53.013532+00:00 heroku[web.1]: State changed from down to starting 
2017-03-11T16:26:55.743205+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 42518 -e production` 
2017-03-11T16:26:59.184085+00:00 app[web.1]: => Booting Puma 
2017-03-11T16:26:59.184112+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:42518 
2017-03-11T16:26:59.184113+00:00 app[web.1]: => Run `rails server -h` for more startup options 
2017-03-11T16:26:59.813953+00:00 app[web.1]: Puma starting in single mode... 
2017-03-11T16:26:59.813978+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl 
2017-03-11T16:26:59.814009+00:00 app[web.1]: * Min threads: 5, max threads: 5 
2017-03-11T16:26:59.814025+00:00 app[web.1]: * Environment: production 
2017-03-11T16:26:59.814139+00:00 app[web.1]: * Listening on tcp://0.0.0.0:42518 
2017-03-11T16:26:59.814338+00:00 app[web.1]: Use Ctrl-C to stop 
2017-03-11T16:27:00.213490+00:00 heroku[web.1]: State changed from starting to up 
2017-03-11T16:27:01.161259+00:00 heroku[router]: at=info method=GET path="/" host=limitless-fortress-32820.herokuapp.com request_id=0394b2a7-1f84-42a8-9f38-5093385535b9 fwd="68.113.158.107,66.249.88.31" dyno=web.1 connect=1ms service=77ms status=404 bytes=1744 protocol=https 
2017-03-11T16:27:01.104510+00:00 app[web.1]: I, [2017-03-11T16:27:01.104407 #4] INFO -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Started GET "/" for 66.249.88.31 at 2017-03-11 16:27:01 +0000 
2017-03-11T16:27:01.107677+00:00 app[web.1]: I, [2017-03-11T16:27:01.107612 #4] INFO -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Processing by PagesController#home as HTML 
2017-03-11T16:27:01.138947+00:00 app[web.1]: D, [2017-03-11T16:27:01.138843 #4] DEBUG -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Plan Load (2.7ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] 
2017-03-11T16:27:01.144670+00:00 app[web.1]: D, [2017-03-11T16:27:01.144594 #4] DEBUG -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Plan Load (1.0ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] 
2017-03-11T16:27:01.145093+00:00 app[web.1]: I, [2017-03-11T16:27:01.145032 #4] INFO -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Completed 404 Not Found in 37ms (ActiveRecord: 16.8ms) 
2017-03-11T16:27:01.145493+00:00 app[web.1]: F, [2017-03-11T16:27:01.145437 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] 
2017-03-11T16:27:01.145518+00:00 app[web.1]: F, [2017-03-11T16:27:01.145485 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3): 
2017-03-11T16:27:01.145558+00:00 app[web.1]: F, [2017-03-11T16:27:01.145518 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] 
2017-03-11T16:27:01.145592+00:00 app[web.1]: F, [2017-03-11T16:27:01.145552 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] app/controllers/pages_controller.rb:5:in `home' 

Ich bin nicht vertraut mit entziffern, was das bedeutet. Dies ist meine erste Bewerbung.

+0

Der beste Weg ist, das Protokoll zu überprüfen, ich benutze Büroklammer App. Sie müssen Paperclick installieren und sorgfältig das Protokoll überprüfen. Kopieren Sie die Fehlermeldungen in das Protokoll und suchen Sie stackoverflow für die Lösung –

Antwort

0

Haben Sie alle Migrationen ausgeführt und die Umgebungsvariablen eingerichtet? Aktivieren Sie Papertrail auf Ihrer Website. Dann können Sie die Protokolle anzeigen, die den Fehler anzeigen sollen.

+0

Ok lass mich es versuchen. Danke für die Antwort. –

+0

Ich bin mir nicht ganz sicher, wie ich dieses Protokoll entziffern soll. –

+0

Besuchen Sie den Stamm Ihrer App und in den Pfeilen von Papertrail suchen Sie nach der Domäne für die 'GET'-Anfrage, z. 'Gestartet GET"/". Nach dieser Zeile gibt es Einträge, die detailliert beschreiben, was mit der Anfrage falsch gelaufen ist. Wenn du die Logs nicht verstehst, poste hier einen Screenshot – margo

0

Der beste Weg zu sehen, was hier passiert, ist durch Lesen der Protokolle. Sie können dies tun, indem Sie:

heroku logs -a limitless-fortress-32820 (or whatever you named your app) 

Sie würden dies in der Commandline tun und dies setzt voraus, dass Sie die heroku cli Tools installiert sein. Überprüfen Sie den Fehler, den das Protokoll anzeigt, und gehen Sie von dort aus. Es könnte sich um ein Procfile, ein Problem mit Umgebungsvariablen, ein Migrationsproblem oder eine beliebige Anzahl von Dingen handeln.

0

Um Heroku Protokolle in Echtzeit zu überprüfen:

heroku logs -t -a limitless-fortress-32820 

Überprüfen Sie die folgenden Probleme zu lösen: 1. Haben Sie PG-Datenbank? 2. Wird die gesamte Migrationsdatei ausgeführt?

Verwandte Themen