Ich habe versucht, eine einfache App "rails" auf Heroku zu installieren, und ich war völlig erfolglos.Fehler beim Deployment der App "rails" auf Heroku
Ich arbeite am Mac-Terminal mit den Vorbereitungsarbeiten der Viking Code School, um durch die "Railsfest-Installation" zu laufen. Dies ist die genaue Verbindung, die ich verfolgt haben:
http://docs.railsbridge.org/installfest/deploy_a_rails_app
Mein Problem ist, dass es so aussieht, wie ich die App erfolgreich eingesetzt haben, aber wenn Sie den Link zu gehen:
https://powerful-river-94011.herokuapp.com
kann man deutlich sehen, dass "etwas nicht stimmt" ... laut Herokus Standardausgabe.
Ich habe jede Lösung gearbeitet, um zu versuchen, das Problem zwischen den Befehlen zu:
gem install bundler
bundle install --without production
Ich habe die Datei korrekt in der routes.rb Datei einrichten, und ich habe auch verpflichtet, alle Änderungen git mit:
git add .
git commit -m "Updates for heroic deployment"
und ich habe alles durch erfolgreich mit gedrücktem:
git push heroku master
bevor ich erfolgreich pushe, habe ich eine ganze Reihe von Fehlern durch Hinzufügen eines Procfiles zum Root-Pfad der Test-App, Ändern der Gem-Dateien auf die verwendete Ruby-Version, Aktualisieren des Bundlers mit der gewünschten expliziten Version, Aktualisieren von Xcode und allem sonst kann man online darüber finden.
Ich habe das Ausmaß dessen erreicht, was ich weiß, um das zu lösen und was übrig bleibt, ist die Protokolle durchzulesen, aber ich weiß nicht, wie ich das noch machen soll.
unten sind die Protokolldateien für dieses Problem, und wenn Sie mir helfen können, den Bereich zu lokalisieren, der meine Kopfschmerzen verursacht, wäre ich sehr dankbar.
krank wahrscheinlich wahrscheinlich sogar ein Kopfgeld !!!
siehe Protokolle:
bash-3.2$ heroku logs
2016-09-18T23:32:28.482253+00:00 app[web.1]: LINE 1: SELECT "drinks".* FROM "drinks"
2016-09-18T23:32:28.482253+00:00 app[web.1]: ^
2016-09-18T23:32:28.482254+00:00 app[web.1]: : SELECT "drinks".* FROM "drinks"):
2016-09-18T23:32:28.482459+00:00 app[web.1]: F, [2016-09-18T23:32:28.482403 #3] FATAL -- : [8a3e7df9-9c3c-4e87-99db-98b963445aa1] 12: </thead>
2016-09-18T23:32:28.482511+00:00 app[web.1]: F, [2016-09-18T23:32:28.482450 #3] FATAL -- : [8a3e7df9-9c3c-4e87-99db-98b963445aa1] 13:
2016-09-18T23:32:28.482559+00:00 app[web.1]: F, [2016-09-18T23:32:28.482507 #3] FATAL -- : [8a3e7df9-9c3c-4e87-99db-98b963445aa1] 14: <tbody>
2016-09-18T23:32:28.482607+00:00 app[web.1]: F, [2016-09-18T23:32:28.482554 #3] FATAL -- : [8a3e7df9-9c3c-4e87-99db-98b963445aa1] 15: <% @drinks.each do |drink| %>
2016-09-18T23:32:28.482653+00:00 app[web.1]: F, [2016-09-18T23:32:28.482602 #3] FATAL -- : [8a3e7df9-9c3c-4e87-99db-98b963445aa1] 16: <tr>
2016-09-18T23:32:28.482699+00:00 app[web.1]: F, [2016-09-18T23:32:28.482648 #3] FATAL -- : [8a3e7df9-9c3c-4e87-99db-98b963445aa1] 17: <td><%= drink.name %></td>
2016-09-18T23:32:28.482747+00:00 app[web.1]: F, [2016-09-18T23:32:28.482695 #3] FATAL -- : [8a3e7df9-9c3c-4e87-99db-98b963445aa1] 18: <td><%= drink.temperature %></td>
2016-09-18T23:32:28.482801+00:00 app[web.1]: F, [2016-09-18T23:32:28.482742 #3] FATAL -- : [8a3e7df9-9c3c-4e87-99db-98b963445aa1]
2016-09-18T23:32:28.482851+00:00 app[web.1]: F, [2016-09-18T23:32:28.482796 #3] FATAL -- : [8a3e7df9-9c3c-4e87-99db-98b963445aa1] app/views/drinks/index.html.erb:15:in `_app_views_drinks_index_html_erb___3144108514546919488_70045158412820'
2016-09-18T23:38:53.796354+00:00 heroku[slug-compiler]: Slug compilation started
2016-09-18T23:38:53.796363+00:00 heroku[slug-compiler]: Slug compilation finished
2016-09-18T23:38:53.571881+00:00 heroku[api]: Deploy eb7fe63 by [email protected]
2016-09-18T23:38:53.571938+00:00 heroku[api]: Release v7 created by [email protected]
2016-09-18T23:38:54.227728+00:00 heroku[web.1]: Restarting
2016-09-18T23:38:54.228404+00:00 heroku[web.1]: State changed from up to starting
2016-09-18T23:38:57.046379+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 22549 -e production`
2016-09-18T23:38:57.661732+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-09-18T23:38:58.634008+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2016-09-18T23:38:58.634151+00:00 app[web.1]: === puma shutdown: 2016-09-18 23:38:58 +0000 ===
2016-09-18T23:38:58.634155+00:00 app[web.1]: - Goodbye!
2016-09-18T23:38:58.634262+00:00 app[web.1]: Exiting
2016-09-18T23:38:58.847640+00:00 heroku[web.1]: Process exited with status 0
2016-09-18T23:39:01.848588+00:00 app[web.1]: => Booting Puma
2016-09-18T23:39:01.848604+00:00 app[web.1]: => Rails 5.0.0.1 application starting in production on http://0.0.0.0:22549
2016-09-18T23:39:01.848605+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-09-18T23:39:03.746891+00:00 app[web.1]: Puma starting in single mode...
2016-09-18T23:39:03.746907+00:00 app[web.1]: * Version 3.6.0 (ruby 2.3.0-p0), codename: Sleepy Sunday Serenity
2016-09-18T23:39:03.746910+00:00 app[web.1]: * Min threads: 5, max threads: 5
2016-09-18T23:39:03.746941+00:00 app[web.1]: * Environment: production
2016-09-18T23:39:03.747068+00:00 app[web.1]: * Listening on tcp://0.0.0.0:22549
2016-09-18T23:39:03.747420+00:00 app[web.1]: Use Ctrl-C to stop
2016-09-18T23:39:03.924768+00:00 heroku[web.1]: State changed from starting to up
2016-09-18T23:39:06.077662+00:00 heroku[router]: at=info method=GET path="/" host=powerful-river-94011.herokuapp.com request_id=9fd02c9a-b60a-482f-8162-cf234d790d5e fwd="173.109.254.111" dyno=web.1 connect=1ms service=146ms status=500 bytes=1669
2016-09-18T23:39:06.013101+00:00 app[web.1]: I, [2016-09-18T23:39:06.012945 #3] INFO -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] Started GET "/" for 173.109.254.111 at 2016-09-18 23:39:06 +0000
2016-09-18T23:39:06.021251+00:00 app[web.1]: I, [2016-09-18T23:39:06.021149 #3] INFO -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] Processing by DrinksController#index as HTML
2016-09-18T23:39:06.053632+00:00 app[web.1]: I, [2016-09-18T23:39:06.053528 #3] INFO -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] Rendering drinks/index.html.erb within layouts/application
2016-09-18T23:39:06.057188+00:00 app[web.1]: D, [2016-09-18T23:39:06.057110 #3] DEBUG -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] Drink Load (1.4ms) SELECT "drinks".* FROM "drinks"
2016-09-18T23:39:06.057943+00:00 app[web.1]: I, [2016-09-18T23:39:06.057878 #3] INFO -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] Rendered drinks/index.html.erb within layouts/application (4.2ms)
2016-09-18T23:39:06.058217+00:00 app[web.1]: I, [2016-09-18T23:39:06.058153 #3] INFO -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] Completed 500 Internal Server Error in 37ms (ActiveRecord: 1.4ms)
2016-09-18T23:39:06.059622+00:00 app[web.1]: F, [2016-09-18T23:39:06.059558 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e]
2016-09-18T23:39:06.059696+00:00 app[web.1]: F, [2016-09-18T23:39:06.059630 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "drinks" does not exist
2016-09-18T23:39:06.059698+00:00 app[web.1]: LINE 1: SELECT "drinks".* FROM "drinks"
2016-09-18T23:39:06.059699+00:00 app[web.1]: : SELECT "drinks".* FROM "drinks"):
2016-09-18T23:39:06.059698+00:00 app[web.1]: ^
2016-09-18T23:39:06.059950+00:00 app[web.1]: F, [2016-09-18T23:39:06.059892 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] 12: </thead>
2016-09-18T23:39:06.060055+00:00 app[web.1]: F, [2016-09-18T23:39:06.059952 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] 13:
2016-09-18T23:39:06.060108+00:00 app[web.1]: F, [2016-09-18T23:39:06.060057 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] 14: <tbody>
2016-09-18T23:39:06.060166+00:00 app[web.1]: F, [2016-09-18T23:39:06.060110 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] 15: <% @drinks.each do |drink| %>
2016-09-18T23:39:06.060210+00:00 app[web.1]: F, [2016-09-18T23:39:06.060162 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] 16: <tr>
2016-09-18T23:39:06.060272+00:00 app[web.1]: F, [2016-09-18T23:39:06.060213 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] 17: <td><%= drink.name %></td>
2016-09-18T23:39:06.060339+00:00 app[web.1]: F, [2016-09-18T23:39:06.060277 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] 18: <td><%= drink.temperature %></td>
2016-09-18T23:39:06.060385+00:00 app[web.1]: F, [2016-09-18T23:39:06.060336 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e]
2016-09-18T23:39:06.060442+00:00 app[web.1]: F, [2016-09-18T23:39:06.060389 #3] FATAL -- : [9fd02c9a-b60a-482f-8162-cf234d790d5e] app/views/drinks/index.html.erb:15:in `_app_views_drinks_index_html_erb__3754491165099000081_70308452059260'
2016-09-19T00:16:06.502893+00:00 heroku[web.1]: Idling
2016-09-19T00:16:06.503495+00:00 heroku[web.1]: State changed from up to down
2016-09-19T00:16:10.228016+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-09-19T00:16:11.295273+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2016-09-19T00:16:11.300740+00:00 app[web.1]: === puma shutdown: 2016-09-19 00:16:11 +0000 ===
2016-09-19T00:16:11.300771+00:00 app[web.1]: - Goodbye!
2016-09-19T00:16:11.303483+00:00 app[web.1]: Exiting
2016-09-19T00:16:11.658476+00:00 heroku[web.1]: Process exited with status 0
2016-09-19T00:29:07.753454+00:00 heroku[api]: Deploy 5b3e6f2 by [email protected]
2016-09-19T00:29:07.753587+00:00 heroku[api]: Release v8 created by [email protected]
2016-09-19T00:29:08.056459+00:00 heroku[slug-compiler]: Slug compilation started
2016-09-19T00:29:08.056470+00:00 heroku[slug-compiler]: Slug compilation finished
2016-09-19T00:29:08.466255+00:00 heroku[web.1]: State changed from down to starting
2016-09-19T00:29:10.915980+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 5753`
2016-09-19T00:29:14.218025+00:00 app[web.1]: => Booting Puma
2016-09-19T00:29:14.218044+00:00 app[web.1]: => Rails 5.0.0.1 application starting in production on http://0.0.0.0:5753
2016-09-19T00:29:14.218045+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-09-19T00:29:15.338030+00:00 app[web.1]: Puma starting in single mode...
2016-09-19T00:29:15.338095+00:00 app[web.1]: * Version 3.6.0 (ruby 2.3.0-p0), codename: Sleepy Sunday Serenity
2016-09-19T00:29:15.338100+00:00 app[web.1]: * Min threads: 5, max threads: 5
2016-09-19T00:29:15.338121+00:00 app[web.1]: * Environment: production
2016-09-19T00:29:15.338253+00:00 app[web.1]: * Listening on tcp://0.0.0.0:5753
2016-09-19T00:29:15.338788+00:00 app[web.1]: Use Ctrl-C to stop
2016-09-19T00:29:16.009844+00:00 heroku[web.1]: State changed from starting to up
2016-09-19T00:29:29.948560+00:00 heroku[router]: at=info method=GET path="/" host=powerful-river-94011.herokuapp.com request_id=3fc77aa8-702f-4a4d-b944-92e719770e93 fwd="173.109.254.111" dyno=web.1 connect=0ms service=97ms status=500 bytes=1669
2016-09-19T00:29:29.908406+00:00 app[web.1]: I, [2016-09-19T00:29:29.908307 #3] INFO -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] Started GET "/" for 173.109.254.111 at 2016-09-19 00:29:29 +0000
2016-09-19T00:29:29.913950+00:00 app[web.1]: I, [2016-09-19T00:29:29.913875 #3] INFO -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] Processing by DrinksController#index as HTML
2016-09-19T00:29:29.930107+00:00 app[web.1]: I, [2016-09-19T00:29:29.930014 #3] INFO -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] Rendering drinks/index.html.erb within layouts/application
2016-09-19T00:29:29.934558+00:00 app[web.1]: D, [2016-09-19T00:29:29.934469 #3] DEBUG -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] Drink Load (2.0ms) SELECT "drinks".* FROM "drinks"
2016-09-19T00:29:29.935373+00:00 app[web.1]: I, [2016-09-19T00:29:29.935300 #3] INFO -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] Rendered drinks/index.html.erb within layouts/application (5.0ms)
2016-09-19T00:29:29.935723+00:00 app[web.1]: I, [2016-09-19T00:29:29.935651 #3] INFO -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] Completed 500 Internal Server Error in 22ms (ActiveRecord: 2.0ms)
2016-09-19T00:29:29.937360+00:00 app[web.1]: F, [2016-09-19T00:29:29.937284 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93]
2016-09-19T00:29:29.937443+00:00 app[web.1]: F, [2016-09-19T00:29:29.937364 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "drinks" does not exist
2016-09-19T00:29:29.937445+00:00 app[web.1]: LINE 1: SELECT "drinks".* FROM "drinks"
2016-09-19T00:29:29.937446+00:00 app[web.1]: ^
2016-09-19T00:29:29.937446+00:00 app[web.1]: : SELECT "drinks".* FROM "drinks"):
2016-09-19T00:29:29.945989+00:00 app[web.1]: F, [2016-09-19T00:29:29.945902 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] 12: </thead>
2016-09-19T00:29:29.946071+00:00 app[web.1]: F, [2016-09-19T00:29:29.945991 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] 13:
2016-09-19T00:29:29.946309+00:00 app[web.1]: F, [2016-09-19T00:29:29.946233 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] 14: <tbody>
2016-09-19T00:29:29.946375+00:00 app[web.1]: F, [2016-09-19T00:29:29.946313 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] 15: <% @drinks.each do |drink| %>
2016-09-19T00:29:29.946450+00:00 app[web.1]: F, [2016-09-19T00:29:29.946377 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] 16: <tr>
2016-09-19T00:29:29.946769+00:00 app[web.1]: F, [2016-09-19T00:29:29.946700 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] 17: <td><%= drink.name %></td>
2016-09-19T00:29:29.946843+00:00 app[web.1]: F, [2016-09-19T00:29:29.946772 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] 18: <td><%= drink.temperature %></td>
2016-09-19T00:29:29.946942+00:00 app[web.1]: F, [2016-09-19T00:29:29.946846 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93]
2016-09-19T00:29:29.947034+00:00 app[web.1]: F, [2016-09-19T00:29:29.946967 #3] FATAL -- : [3fc77aa8-702f-4a4d-b944-92e719770e93] app/views/drinks/index.html.erb:15:in `_app_views_drinks_index_html_erb___232611807967303687_70173197040100'
bash-3.2$ git remote show
heroku
Die 'PG :: UndefinedTable: FEHLER: Relation" Getränke "existiert nicht 'Fehler schlägt vor, dass Sie nicht' db: migrieren' auf Heroku. –
es ist immer etwas einfach ist es nicht ... lassen Sie mich es überprüfen – lopezdp
@muistooshort Jesus Mann! Ich habe den ganzen Tag damit verbracht und es war nichts mehr als ich verdammt Befehl im Terminal !!! Wie auch immer, mein Freund, das war die Lösung für mein Problem. Willst du es in die Antwort schreiben, damit du die Punkte dafür bekommen kannst? Ich schätze es wirklich. jede Begründung, die du vielleicht hinzufügen möchtest, könnte mir helfen, herauszufinden, dass das in der Zukunft auch dem Beitrag helfen könnte ... – lopezdp