Rails应用程序部署到heroku,错误为H10

时间:2016-12-18 07:30:15

标签: ruby-on-rails ruby heroku

我正在向Heroku部署Rails(Rails v5.0.0.1)应用程序。但是,当我尝试访问该应用程序时,它会崩溃,错误代码为H10。谷歌搜索了一段时间后,我尝试重新启动应用程序的所有dynos,因为人们建议,但它没有工作。甚至更奇怪的是我无法运行heroku run rails console来访问控制台,当我运行它时,它显示:

Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]                                      # Path to the Ruby binary of your choice
                                                         # Default: /app/vendor/ruby-2.3.0/bin/ruby
  -m, [--template=TEMPLATE]                              # Path to some application template (can be a filesystem path or URL)
  -d, [--database=DATABASE]                              # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
                                                         # Default: sqlite3
  -j, [--javascript=JAVASCRIPT]                          # Preconfigure for selected JavaScript library
                                                         # Default: jquery
      [--skip-gemfile], [--no-skip-gemfile]              # Don't create a Gemfile
  -B, [--skip-bundle], [--no-skip-bundle]                # Don't run bundle install
  -G, [--skip-git], [--no-skip-git]                      # Skip .gitignore file
      [--skip-keeps], [--no-skip-keeps]                  # Skip source control .keep files
  -M, [--skip-action-mailer], [--no-skip-action-mailer]  # Skip Action Mailer files
  -O, [--skip-active-record], [--no-skip-active-record]  # Skip Active Record files...

请注意,我可以在推送到heroku后运行heroku run rake db:migrate。这是日志:

2016-12-18T06:44:34.515479+00:00 heroku[web.1]: Process exited with status 127
2016-12-18T06:44:46.337848+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mighty-island-98480.herokuapp.com request_id=fd929087-20a6-4c20-b534-f14261d3de11 fwd="210.245.33.22" dyno= connect= service= status=503 bytes=
2016-12-18T06:44:46.757726+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mighty-island-98480.herokuapp.com request_id=ff3d39de-e593-41d4-b8d1-26fa9befc27e fwd="203.205.28.130" dyno= connect= service= status=503 bytes=
2016-12-18T06:46:59.953430+00:00 heroku[web.1]: State changed from crashed to starting
2016-12-18T06:47:05.203056+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 26350 -e production`
2016-12-18T06:47:06.697360+00:00 app[web.1]: bash: bin/rails: No such file or directory
2016-12-18T06:47:06.797834+00:00 heroku[web.1]: State changed from starting to crashed
2016-12-18T06:47:06.798798+00:00 heroku[web.1]: State changed from crashed to starting
2016-12-18T06:47:06.775021+00:00 heroku[web.1]: Process exited with status 127
2016-12-18T06:47:11.275436+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 31405 -e production`
2016-12-18T06:47:13.273106+00:00 app[web.1]: bash: bin/rails: No such file or directory
2016-12-18T06:47:13.382651+00:00 heroku[web.1]: State changed from starting to crashed
2016-12-18T06:47:13.364125+00:00 heroku[web.1]: Process exited with status 127
2016-12-18T06:47:15.177482+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mighty-island-98480.herokuapp.com request_id=838f042a-36fb-4b80-9dd1-68146388a2f9 fwd="203.205.28.130" dyno= connect= service= status=503 bytes=
2016-12-18T06:47:14.847769+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mighty-island-98480.herokuapp.com request_id=329ddb98-3588-4a7e-ba85-86f2ebb0c787 fwd="203.205.28.130" dyno= connect= service= status=503 bytes=
2016-12-18T06:47:17.892965+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mighty-island-98480.herokuapp.com request_id=64f4d85b-f4be-473b-886b-16bcbabcebb2 fwd="210.245.33.22" dyno= connect= service= status=503 bytes=
2016-12-18T06:47:18.158159+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mighty-island-98480.herokuapp.com request_id=6f95c551-e2a1-4afd-aa6a-00344743d3d9 fwd="203.205.28.130" dyno= connect= service= status=503 bytes=
2016-12-18T06:47:35.998915+00:00 app[api]: Starting process with command `bundle exec rake rails console` by user yaphats280396@gmail.com
2016-12-18T06:47:42.534769+00:00 heroku[run.1014]: Awaiting client
2016-12-18T06:47:42.584498+00:00 heroku[run.1014]: Starting process with command `bundle exec rake rails console`
2016-12-18T06:47:42.560559+00:00 heroku[run.1014]: State changed from starting to up
2016-12-18T06:47:50.393316+00:00 heroku[run.1014]: Process exited with status 1
2016-12-18T06:47:50.411848+00:00 heroku[run.1014]: State changed from up to complete
2016-12-18T06:48:03.813169+00:00 app[api]: Starting process with command `rails console` by user yaphats280396@gmail.com
2016-12-18T06:48:09.475386+00:00 heroku[run.8367]: Awaiting client
2016-12-18T06:48:09.520745+00:00 heroku[run.8367]: Starting process with command `rails console`
2016-12-18T06:48:09.640673+00:00 heroku[run.8367]: State changed from starting to up
2016-12-18T06:48:14.736012+00:00 heroku[run.8367]: State changed from up to complete
2016-12-18T06:48:14.699247+00:00 heroku[run.8367]: Process exited with status 0
2016-12-18T06:52:47.096470+00:00 heroku[slug-compiler]: Slug compilation started
2016-12-18T06:55:24.601041+00:00 heroku[slug-compiler]: Slug compilation started
2016-12-18T06:58:02.189014+00:00 app[api]: Deploy 18728fe by user yaphats280396@gmail.com
2016-12-18T06:58:02.189014+00:00 app[api]: Release v6 created by user yaphats280396@gmail.com
2016-12-18T06:58:02.340404+00:00 heroku[slug-compiler]: Slug compilation started
2016-12-18T06:58:02.340411+00:00 heroku[slug-compiler]: Slug compilation finished
2016-12-18T06:58:02.437765+00:00 heroku[web.1]: State changed from crashed to starting
2016-12-18T06:58:07.513403+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 44886 -e production`
2016-12-18T06:58:09.081681+00:00 heroku[web.1]: Process exited with status 127
2016-12-18T06:58:08.964854+00:00 app[web.1]: bash: bin/rails: No such file or directory
2016-12-18T06:58:09.105664+00:00 heroku[web.1]: State changed from starting to crashed
2016-12-18T07:00:25.355827+00:00 heroku[web.1]: State changed from crashed to starting
2016-12-18T07:00:30.147971+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 52383 -e production`
2016-12-18T07:00:31.821352+00:00 app[web.1]: bash: bin/rails: No such file or directory
2016-12-18T07:00:31.890663+00:00 heroku[web.1]: State changed from starting to crashed
2016-12-18T07:00:31.872039+00:00 heroku[web.1]: Process exited with status 127
2016-12-18T07:01:45.326964+00:00 app[api]: Starting process with command `bundle exec rake db:migrate` by user yaphats280396@gmail.com
2016-12-18T07:01:50.459013+00:00 heroku[run.9961]: Awaiting client
2016-12-18T07:01:50.478532+00:00 heroku[run.9961]: Starting process with command `bundle exec rake db:migrate`
2016-12-18T07:01:50.751333+00:00 heroku[run.9961]: State changed from starting to up
2016-12-18T07:01:56.569373+00:00 heroku[run.9961]: Process exited with status 0
2016-12-18T07:01:56.582918+00:00 heroku[run.9961]: State changed from up to complete
2016-12-18T07:02:03.799642+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mighty-island-98480.herokuapp.com request_id=a886d9c7-771c-4bbc-b0ae-c69a9a2711eb fwd="203.205.28.130" dyno= connect= service= status=503 bytes=
2016-12-18T07:02:04.128488+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mighty-island-98480.herokuapp.com request_id=b639d3fe-89b8-4e85-bec5-092711ab9177 fwd="203.205.28.130" dyno= connect= service= status=503 bytes=
2016-12-18T07:02:06.282079+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mighty-island-98480.herokuapp.com request_id=2a99589c-6000-464f-8d6e-15bca538bb84 fwd="210.245.33.22" dyno= connect= service= status=503 bytes=
2016-12-18T07:02:06.575156+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mighty-island-98480.herokuapp.com request_id=b520a6ee-4bfa-4116-b535-ce00c641097c fwd="203.205.28.130" dyno= connect= service= status=503 bytes=
2016-12-18T07:02:23.077596+00:00 app[api]: Starting process with command `rails console` by user yaphats280396@gmail.com
2016-12-18T07:02:29.656336+00:00 heroku[run.4122]: Awaiting client
2016-12-18T07:02:29.734024+00:00 heroku[run.4122]: Starting process with command `rails console`
2016-12-18T07:02:29.759224+00:00 heroku[run.4122]: State changed from starting to up
2016-12-18T07:02:35.660219+00:00 heroku[run.4122]: State changed from up to complete
2016-12-18T07:02:35.644039+00:00 heroku[run.4122]: Process exited with status 0
2016-12-18T07:06:57.871793+00:00 app[api]: Starting process with command `rails console` by user yaphats280396@gmail.com
2016-12-18T07:07:04.028124+00:00 heroku[run.5253]: State changed from starting to up
2016-12-18T07:07:04.151355+00:00 heroku[run.5253]: Awaiting client
2016-12-18T07:07:04.186644+00:00 heroku[run.5253]: Starting process with command `rails console`
2016-12-18T07:07:09.461403+00:00 heroku[run.5253]: Process exited with status 0
2016-12-18T07:07:09.459229+00:00 heroku[run.5253]: State changed from up to complete
2016-12-18T07:08:01.251294+00:00 app[api]: Starting process with command `spring stop` by user yaphats280396@gmail.com
2016-12-18T07:08:06.994287+00:00 heroku[run.2057]: Awaiting client
2016-12-18T07:08:07.013915+00:00 heroku[run.2057]: Starting process with command `spring stop`
2016-12-18T07:08:07.238356+00:00 heroku[run.2057]: State changed from starting to up
2016-12-18T07:08:11.161840+00:00 heroku[run.2057]: State changed from up to complete
2016-12-18T07:08:11.142680+00:00 heroku[run.2057]: Process exited with status 1
2016-12-18T07:18:42.513123+00:00 heroku[slug-compiler]: Slug compilation started
2016-12-18T07:18:42.513132+00:00 heroku[slug-compiler]: Slug compilation finished
2016-12-18T07:18:42.641136+00:00 heroku[web.1]: State changed from crashed to starting
2016-12-18T07:18:42.376404+00:00 app[api]: Release v7 created by user yaphats280396@gmail.com
2016-12-18T07:18:42.376404+00:00 app[api]: Deploy 0f0c253 by user yaphats280396@gmail.com
2016-12-18T07:18:48.864292+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 56507 -e production`
2016-12-18T07:18:51.479943+00:00 heroku[web.1]: Process exited with status 127
2016-12-18T07:18:51.513045+00:00 heroku[web.1]: State changed from starting to crashed
2016-12-18T07:18:51.514288+00:00 heroku[web.1]: State changed from crashed to starting
2016-12-18T07:18:51.351956+00:00 app[web.1]: bash: bin/rails: No such file or directory
2016-12-18T07:18:56.601461+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 47201 -e production`
2016-12-18T07:18:58.427067+00:00 app[web.1]: bash: bin/rails: No such file or directory
2016-12-18T07:18:58.490908+00:00 heroku[web.1]: Process exited with status 127
2016-12-18T07:18:58.523092+00:00 heroku[web.1]: State changed from starting to crashed
2016-12-18T07:19:26.047830+00:00 app[api]: Starting process with command `bundle exec rake db:migrate` by user yaphats280396@gmail.com
2016-12-18T07:19:31.378985+00:00 heroku[run.4257]: Awaiting client
2016-12-18T07:19:31.407367+00:00 heroku[run.4257]: Starting process with command `bundle exec rake db:migrate`
2016-12-18T07:19:31.663915+00:00 heroku[run.4257]: State changed from starting to up
2016-12-18T07:19:37.609181+00:00 heroku[run.4257]: State changed from up to complete
2016-12-18T07:19:37.628694+00:00 heroku[run.4257]: Process exited with status 0
2016-12-18T07:19:47.465402+00:00 app[api]: Starting process with command `rails console` by user yaphats280396@gmail.com
2016-12-18T07:19:53.296424+00:00 heroku[run.8574]: Awaiting client
2016-12-18T07:19:53.460124+00:00 heroku[run.8574]: State changed from starting to up
2016-12-18T07:19:53.343683+00:00 heroku[run.8574]: Starting process with command `rails console`
2016-12-18T07:19:57.742878+00:00 heroku[run.8574]: State changed from up to complete
2016-12-18T07:19:57.727626+00:00 heroku[run.8574]: Process exited with status 0
2016-12-18T07:20:40.222378+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mighty-island-98480.herokuapp.com request_id=221c14dd-1775-4891-83ce-e8a24678075f fwd="203.205.28.130" dyno= connect= service= status=503 bytes=
2016-12-18T07:20:40.532629+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mighty-island-98480.herokuapp.com request_id=5b2ff337-7233-49bc-a4a8-6b8dd1d485ff fwd="203.205.28.130" dyno= connect= service= status=503 bytes=

我之前已经向Heroku部署了几个应用程序,但从未遇到过这种奇怪的情况。如果需要,我会提供更多文件/细节。

1 个答案:

答案 0 :(得分:1)

我想通了:我忘了为Puma提供一个Procfile