我试图在Rails应用程序中进行一些更改以配置元描述,但是它不起作用。它包括通过命令HOST
在Heroku上更改我的heroku config:set HOST=
环境变量。我删除了所有文件,然后在Heroku上重新按了,但仍然出现“应用程序崩溃”错误。
我收到此消息:
› Warning: heroku update available from 7.15.1 to 7.16.0
› Warning: heroku update available from 7.15.1 to 7.16.0
2018-09-18T06:48:01.668275+00:00 heroku[web.1]: State changed from up to down
2018-09-18T06:48:02.705400+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-09-18T06:48:02.848536+00:00 heroku[web.1]: Process exited with status 143
2018-09-18T06:48:02.720940+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2018-09-18T06:48:02.726712+00:00 app[web.1]: === puma shutdown: 2018-09-18 06:48:02 +0000 ===
2018-09-18T06:48:02.726956+00:00 app[web.1]: - Goodbye!
2018-09-18T06:48:02.727461+00:00 app[web.1]: Exiting
2018-09-18T06:56:31.089861+00:00 heroku[web.1]: Unidling
2018-09-18T06:56:31.090223+00:00 heroku[web.1]: State changed from down to starting
2018-09-18T06:56:40.477994+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 45736 -e production`
2018-09-18T06:56:54.441128+00:00 heroku[web.1]: State changed from starting to up
2018-09-18T06:56:55.580057+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=bourse-aux-aventuriers-2.herokuapp.com request_id=fc981100-f310-4e0b-8842-3bc0c8f46188 fwd="84.14.51.130" dyno=web.1 connect=0ms service=3ms status=200 bytes=143 protocol=http
2018-09-18T06:56:55.455001+00:00 heroku[router]: at=info method=GET path="/" host=bourse-aux-aventuriers-2.herokuapp.com request_id=e2277588-af4b-4d45-847d-628f074f8cd7 fwd="84.14.51.130" dyno=web.1 connect=0ms service=218ms status=500 bytes=1827 protocol=http
2018-09-18T06:56:55.237118+00:00 app[web.1]: => Booting Puma
2018-09-18T06:56:55.237134+00:00 app[web.1]: => Rails 5.2.0 application starting in production
2018-09-18T06:56:55.237136+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-09-18T06:56:55.237137+00:00 app[web.1]: Puma starting in single mode...
2018-09-18T06:56:55.237138+00:00 app[web.1]: * Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas
2018-09-18T06:56:55.237140+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-09-18T06:56:55.237141+00:00 app[web.1]: * Environment: production
2018-09-18T06:56:55.237142+00:00 app[web.1]: * Listening on tcp://0.0.0.0:45736
2018-09-18T06:56:55.237143+00:00 app[web.1]: Use Ctrl-C to stop
2018-09-18T06:56:55.237145+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] Started GET "/" for 84.14.51.130 at 2018-09-18 06:56:55 +0000
2018-09-18T06:56:55.287015+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] Processing by PagesController#search as HTML
2018-09-18T06:56:55.415134+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] Adventure Load (2.1ms) SELECT "adventures".* FROM "adventures" WHERE "adventures"."active" = $1 LIMIT $2 OFFSET $3 [["active", true], ["LIMIT", 4], ["OFFSET", 0]]
2018-09-18T06:56:55.445624+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] Rendered pages/search.html.erb within layouts/application (22.7ms)
2018-09-18T06:56:55.445888+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] Completed 500 Internal Server Error in 159ms (ActiveRecord: 29.2ms)
2018-09-18T06:56:55.422755+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] Rendering pages/search.html.erb within layouts/application
2018-09-18T06:56:55.446911+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7]
2018-09-18T06:56:55.446952+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] ActionView::Template::Error (undefined method `level_eq' for #<Ransack::Search:0x000055f99d153370>):
2018-09-18T06:56:55.447317+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] 60: <div class="form-group">
2018-09-18T06:56:55.447320+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] 61: <label></label>
2018-09-18T06:56:55.447321+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] 62:
2018-09-18T06:56:55.447336+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] 63: <%= f.select :level_eq, [["Débutant","Débutant"],
2018-09-18T06:56:55.447338+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] 64: ["Intermédiaire","Intermédiaire"],
2018-09-18T06:56:55.447341+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] 66: ["Expert","Expert"]],
2018-09-18T06:56:55.447345+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7]
2018-09-18T06:56:55.447339+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] 65: ["Avancé","Avancé"],
2018-09-18T06:56:55.447374+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] app/views/pages/search.html.erb:63:in `block in _app_views_pages_search_html_erb__4235502768366703437_47265285208920'
2018-09-18T06:56:55.447376+00:00 app[web.1]: [e2277588-af4b-4d45-847d-628f074f8cd7] app/views/pages/search.html.erb:23:in `_app_views_pages_search_html_erb__4235502768366703437_47265285208920'
2018-09-18T07:00:28.456109+00:00 heroku[router]: at=info method=GET path="/" host=bourse-aux-aventuriers-2.herokuapp.com request_id=8cf6df4b-aa41-4dcb-818a-281e2a663319 fwd="84.14.51.130" dyno=web.1 connect=0ms service=30ms status=500 bytes=1827 protocol=http
2018-09-18T07:00:28.426449+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] Started GET "/" for 84.14.51.130 at 2018-09-18 07:00:28 +0000
2018-09-18T07:00:28.438764+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] Adventure Load (3.2ms) SELECT "adventures".* FROM "adventures" WHERE "adventures"."active" = $1 LIMIT $2 OFFSET $3 [["active", true], ["LIMIT", 4], ["OFFSET", 0]]
2018-09-18T07:00:28.440286+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] Rendering pages/search.html.erb within layouts/application
2018-09-18T07:00:28.427876+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] Processing by PagesController#search as HTML
2018-09-18T07:00:28.451244+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] Rendered pages/search.html.erb within layouts/application (10.8ms)
2018-09-18T07:00:28.452885+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319]
2018-09-18T07:00:28.451496+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] Completed 500 Internal Server Error in 23ms (ActiveRecord: 3.2ms)
2018-09-18T07:00:28.452928+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] ActionView::Template::Error (undefined method `level_eq' for #<Ransack::Search:0x000055f99d039958>):
2018-09-18T07:00:28.453270+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] 60: <div class="form-group">
2018-09-18T07:00:28.453276+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] 63: <%= f.select :level_eq, [["Débutant","Débutant"],
2018-09-18T07:00:28.453272+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] 61: <label></label>
2018-09-18T07:00:28.453274+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] 62:
2018-09-18T07:00:28.453278+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] 65: ["Avancé","Avancé"],
2018-09-18T07:00:28.453277+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] 64: ["Intermédiaire","Intermédiaire"],
2018-09-18T07:00:28.453364+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] app/views/pages/search.html.erb:63:in `block in _app_views_pages_search_html_erb__4235502768366703437_47265285208920'
2018-09-18T07:00:28.453279+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] 66: ["Expert","Expert"]],
2018-09-18T07:00:28.453318+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319]
2018-09-18T07:00:28.453366+00:00 app[web.1]: [8cf6df4b-aa41-4dcb-818a-281e2a663319] app/views/pages/search.html.erb:23:in `_app_views_pages_search_html_erb__4235502768366703437_47265285208920'
2018-09-18T07:33:59.460148+00:00 heroku[web.1]: Idling
2018-09-18T07:33:59.460627+00:00 heroku[web.1]: State changed from up to down
2018-09-18T07:34:00.381819+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-09-18T07:34:00.510580+00:00 heroku[web.1]: Process exited with status 143
2018-09-18T07:34:00.394804+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2018-09-18T07:34:00.401884+00:00 app[web.1]: === puma shutdown: 2018-09-18 07:34:00 +0000 ===
2018-09-18T07:34:00.401892+00:00 app[web.1]: - Goodbye!
2018-09-18T07:34:00.401977+00:00 app[web.1]: Exiting
2018-09-18T12:23:25.742652+00:00 heroku[web.1]: Unidling
2018-09-18T12:23:25.742987+00:00 heroku[web.1]: State changed from down to starting
2018-09-18T12:23:31.801361+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 45496 -e production`
2018-09-18T12:23:37.998863+00:00 heroku[web.1]: State changed from starting to up
2018-09-18T12:23:39.878204+00:00 app[web.1]: => Booting Puma
2018-09-18T12:23:39.878239+00:00 app[web.1]: => Rails 5.2.0 application starting in production
2018-09-18T12:23:39.878241+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-09-18T12:23:39.878247+00:00 app[web.1]: Puma starting in single mode...
2018-09-18T12:23:39.878248+00:00 app[web.1]: * Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas
2018-09-18T12:23:39.878254+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-09-18T12:23:39.878255+00:00 app[web.1]: * Environment: production
2018-09-18T12:23:39.878256+00:00 app[web.1]: * Listening on tcp://0.0.0.0:45496
2018-09-18T12:23:39.878257+00:00 app[web.1]: Use Ctrl-C to stop
2018-09-18T12:23:39.878265+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] Started GET "/" for 84.14.51.130 at 2018-09-18 12:23:39 +0000
2018-09-18T12:23:39.889960+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] Processing by PagesController#search as HTML
2018-09-18T12:23:39.958889+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] Adventure Load (1.0ms) SELECT "adventures".* FROM "adventures" WHERE "adventures"."active" = $1 LIMIT $2 OFFSET $3 [["active", true], ["LIMIT", 4], ["OFFSET", 0]]
2018-09-18T12:23:39.961971+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] Rendering pages/search.html.erb within layouts/application
2018-09-18T12:23:39.968395+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] Rendered pages/search.html.erb within layouts/application (6.3ms)
2018-09-18T12:23:39.968547+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] Completed 500 Internal Server Error in 79ms (ActiveRecord: 22.1ms)
2018-09-18T12:23:39.969053+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f]
2018-09-18T12:23:39.969089+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] ActionView::Template::Error (undefined method `level_eq' for #<Ransack::Search:0x00005565f5722cd8>):
2018-09-18T12:23:39.969246+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] 60: <div class="form-group">
2018-09-18T12:23:39.969254+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] 61: <label></label>
2018-09-18T12:23:39.969255+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] 62:
2018-09-18T12:23:39.969256+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] 63: <%= f.select :level_eq, [["Débutant","Débutant"],
2018-09-18T12:23:39.969257+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] 64: ["Intermédiaire","Intermédiaire"],
2018-09-18T12:23:39.969258+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] 65: ["Avancé","Avancé"],
2018-09-18T12:23:39.969259+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] 66: ["Expert","Expert"]],
2018-09-18T12:23:39.969262+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f]
2018-09-18T12:23:39.969289+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] app/views/pages/search.html.erb:23:in `_app_views_pages_search_html_erb__3680868169337598520_46948179683480'
2018-09-18T12:23:39.969288+00:00 app[web.1]: [45b9bc22-8bd8-4382-9eb0-aa2edd67927f] app/views/pages/search.html.erb:63:in `block in _app_views_pages_search_html_erb__3680868169337598520_46948179683480'
2018-09-18T12:23:39.969128+00:00 heroku[router]: at=info method=GET path="/" host=bourse-aux-aventuriers-2.herokuapp.com request_id=45b9bc22-8bd8-4382-9eb0-aa2edd67927f fwd="84.14.51.130" dyno=web.1 connect=0ms service=94ms status=500 bytes=1827 protocol=http
2018-09-18T12:23:40.539688+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=bourse-aux-aventuriers-2.herokuapp.com request_id=339652f4-0fd7-44d0-b91e-8f0064580354 fwd="84.14.51.130" dyno=web.1 connect=0ms service=1ms status=304 bytes=48 protocol=http
我认为这来自于更改Heroku主机的命令。如何在Heroku上重置HOST
环境变量?
答案 0 :(得分:1)
要回答您提出的问题,您可以使用heroku config:unset
取消设置环境变量,例如
heroku config:unset HOST
还可以使用Heroku的网络界面添加,修改和删除环境变量。
但这可能不是导致应用程序崩溃的真正原因。