2016-04-27 11 views
0

最近、私はRailsアプリをHerokuにプッシュし、クラッシュエラー(ログにH10エラーがあります)がありました。何が間違っているのか分かりません。私のHerokuアプリがクラッシュしています(エラーH10)。理由が分かりません

私はheroku restartを試して、削除し、Herokuで私のアプリを再展開しました。最初は、Procfileを見つけることができなかったためにHerokuにコードをプッシュすると警告が表示されていたので、Heumaが提案したように、these instructionsに続いてPumaをインストールしました。

これがなぜ起こっているのか分かりませんし、他のスレッドに当てはまるものが見つかりません。何か案は?

私のログは文脈の下にあります。前もって感謝します!

> Ariels-MacBook-Pro:UNTsafetyApp ArielSkyeBailey$ heroku logs 
> 2016-04-27T17:06:32.859125+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in 
> `instance_exec' 2016-04-27T17:06:32.859125+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in 
> `run' 2016-04-27T17:06:32.859133+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in 
> `block in run_initializers' 2016-04-27T17:06:32.859111+00:00 
> app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:346:in 
> `eager_load!' 2016-04-27T17:06:32.859134+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in 
> tsort_each' 2016-04-27T17:06:32.859136+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in 
> `each_strongly_connected_component_from' 
> 2016-04-27T17:06:32.859135+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 
> levels) in each_strongly_connected_component' 
> 2016-04-27T17:06:32.859143+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in 
> each_strongly_connected_component' 2016-04-27T17:06:32.859146+00:00 
> app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in 
> `each_strongly_connected_component' 2016-04-27T17:06:32.859144+00:00 
> app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each' 
> 2016-04-27T17:06:32.859145+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call' 
> 2016-04-27T17:06:32.859153+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each' 
> 2016-04-27T17:06:32.859156+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:352:in 
> `initialize!' 2016-04-27T17:06:32.859164+00:00 app[web.1]: from 
> /app/config/environment.rb:5:in `<top (required)>' 
> 2016-04-27T17:06:32.859154+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each' 
> 2016-04-27T17:06:32.859155+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in 
> `run_initializers' 2016-04-27T17:06:32.859165+00:00 app[web.1]: from 
> config.ru:3:in `require' 2016-04-27T17:06:32.859174+00:00 app[web.1]: 
> from 
> /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in 
> `initialize' 2016-04-27T17:06:32.859175+00:00 app[web.1]:  from 
> config.ru:in `new' 2016-04-27T17:06:32.859166+00:00 app[web.1]: from 
> config.ru:3:in `block in <main>' 2016-04-27T17:06:32.859182+00:00 
> app[web.1]: from config.ru:in `<main>' 
> 2016-04-27T17:06:32.859173+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in 
> `instance_eval' 2016-04-27T17:06:32.859183+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in 
> `eval' 2016-04-27T17:06:32.859193+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/configuration.rb:242:in 
> `app' 2016-04-27T17:06:32.859185+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in 
> `parse_file' 2016-04-27T17:06:32.859196+00:00 app[web.1]:  from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/cluster.rb:370:in 
> `run' 2016-04-27T17:06:32.859193+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/configuration.rb:313:in 
> `load_rackup' 2016-04-27T17:06:32.859184+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in 
> `new_from_string' 2016-04-27T17:06:32.859204+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/cli.rb:74:in 
> `run' 2016-04-27T17:06:32.859205+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/bin/puma:10:in `<top 
> (required)>' 2016-04-27T17:06:32.859207+00:00 app[web.1]:  from 
> /app/vendor/bundle/ruby/2.2.0/bin/puma:23:in `load' 
> 2016-04-27T17:06:32.859203+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/launcher.rb:172:in 
> `run' 2016-04-27T17:06:32.859214+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/bin/puma:23:in `<main>' 
> 2016-04-27T17:06:32.859195+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/runner.rb:123:in 
> `load_and_bind' 2016-04-27T17:06:33.592393+00:00 heroku[web.1]: State 
> changed from starting to crashed 2016-04-27T17:06:33.546195+00:00 
> heroku[web.1]: Process exited with status 1 
> 2016-04-27T17:06:39.872306+00:00 heroku[web.1]: State changed from 
> crashed to starting 2016-04-27T17:06:42.795985+00:00 heroku[web.1]: 
> Starting process with command `bundle exec puma -C config/puma.rb` 
> 2016-04-27T17:06:45.908101+00:00 app[web.1]: [3] * Min threads: 1, max 
> threads: 1 2016-04-27T17:06:45.908096+00:00 app[web.1]: [3] * Version 
> 3.4.0 (ruby 2.2.1-p85), codename: Owl Bowl Brawl 2016-04-27T17:06:45.908102+00:00 app[web.1]: [3] * Environment: 
> production 2016-04-27T17:06:45.908082+00:00 app[web.1]: [3] Puma 
> starting in cluster mode... 2016-04-27T17:06:45.908103+00:00 
> app[web.1]: [3] * Process workers: 2 2016-04-27T17:06:45.908105+00:00 
> app[web.1]: [3] * Preloading application 
> 2016-04-27T17:06:49.148825+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require' 2016-04-27T17:06:49.148442+00:00 app[web.1]: class 
> registrations::sessionsController < Devise::sessionsController 
> 2016-04-27T17:06:49.148841+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' 2016-04-27T17:06:49.148777+00:00 app[web.1]:   
>^2016-04-27T17:06:49.148742+00:00 app[web.1]: 
> /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require': 
> /app/app/controllers/registrations/sessions_controller.rb:1: 
> class/module name must be CONSTANT (SyntaxError) 
> 2016-04-27T17:06:49.148766+00:00 app[web.1]: class 
> registrations::sessionsController < Devise::sessionsController 
> 2016-04-27T17:06:49.148432+00:00 app[web.1]: [3] ! Unable to load 
> application: SyntaxError: 
> /app/app/controllers/registrations/sessions_controller.rb:1: 
> class/module name must be CONSTANT 2016-04-27T17:06:49.148492+00:00 
> app[web.1]:          ^
> 2016-04-27T17:06:49.149263+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in 
> `block in run_initializers' 2016-04-27T17:06:49.149220+00:00 
> app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in 
> `instance_exec' 2016-04-27T17:06:49.149248+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in 
> `run' 2016-04-27T17:06:49.148858+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' 2016-04-27T17:06:49.148873+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:360:in `require_or_load' 2016-04-27T17:06:49.148888+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:317:in `depend_on' 2016-04-27T17:06:49.148908+00:00 app[web.1]:  from 
> /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:233:in `require_dependency' 2016-04-27T17:06:49.148924+00:00 app[web.1]: 
> from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:472:in 
> `block (2 levels) in eager_load!' 2016-04-27T17:06:49.148941+00:00 
> app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:471:in 
> `each' 2016-04-27T17:06:49.149014+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:471:in 
> `block in eager_load!' 2016-04-27T17:06:49.149042+00:00 app[web.1]: 
> from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:469:in 
> `each' 2016-04-27T17:06:49.149057+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:469:in 
> `eager_load!' 2016-04-27T17:06:49.149114+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:346:in 
> `eager_load!' 2016-04-27T17:06:49.149128+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application/finisher.rb:56:in 
> `each' 2016-04-27T17:06:49.149162+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application/finisher.rb:56:in 
> `block in <module:Finisher>' 2016-04-27T17:06:49.149378+00:00 
> app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call' 
> 2016-04-27T17:06:49.149279+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in 
> tsort_each' 2016-04-27T17:06:49.149294+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 
> levels) in each_strongly_connected_component' 
> 2016-04-27T17:06:49.149391+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in 
> `each_strongly_connected_component' 2016-04-27T17:06:49.149309+00:00 
> app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in 
> `each_strongly_connected_component_from' 
> 2016-04-27T17:06:49.149340+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in 
> each_strongly_connected_component' 2016-04-27T17:06:49.149365+00:00 
> app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each' 
> 2016-04-27T17:06:49.149472+00:00 app[web.1]: from config.ru:3:in 
> `require' 2016-04-27T17:06:49.149564+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in 
> `instance_eval' 2016-04-27T17:06:49.149576+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in 
> `initialize' 2016-04-27T17:06:49.149591+00:00 app[web.1]:  from 
> config.ru:in `new' 2016-04-27T17:06:49.149405+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each' 
> 2016-04-27T17:06:49.149417+00:00 app[web.1]: from 
> /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each' 
> 2016-04-27T17:06:49.149430+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in 
> `run_initializers' 2016-04-27T17:06:49.149603+00:00 app[web.1]: from 
> config.ru:in `<main>' 2016-04-27T17:06:49.149615+00:00 app[web.1]: 
> from 
> /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in 
> `eval' 2016-04-27T17:06:49.149628+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in 
> `new_from_string' 2016-04-27T17:06:49.149642+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in 
> `parse_file' 2016-04-27T17:06:49.149704+00:00 app[web.1]:  from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/configuration.rb:313:in 
> `load_rackup' 2016-04-27T17:06:49.149726+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/configuration.rb:242:in 
> `app' 2016-04-27T17:06:49.149738+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/runner.rb:123:in 
> `load_and_bind' 2016-04-27T17:06:49.149750+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/cluster.rb:370:in 
> `run' 2016-04-27T17:06:49.149776+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/cli.rb:74:in 
> `run' 2016-04-27T17:06:49.149457+00:00 app[web.1]: from 
> /app/config/environment.rb:5:in `<top (required)>' 
> 2016-04-27T17:06:49.149444+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:352:in 
> `initialize!' 2016-04-27T17:06:49.149791+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/bin/puma:10:in `<top 
> (required)>' 2016-04-27T17:06:49.149762+00:00 app[web.1]:  from 
> /app/vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/launcher.rb:172:in 
> `run' 2016-04-27T17:06:49.149806+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/bin/puma:23:in `load' 
> 2016-04-27T17:06:49.149540+00:00 app[web.1]: from config.ru:3:in 
> `block in <main>' 2016-04-27T17:06:49.149882+00:00 app[web.1]: from 
> /app/vendor/bundle/ruby/2.2.0/bin/puma:23:in `<main>' 
> 2016-04-27T17:06:50.226685+00:00 heroku[web.1]: Process exited with 
> status 1 2016-04-27T17:06:50.246790+00:00 heroku[web.1]: State changed 
> from starting to crashed 2016-04-27T17:06:51.370866+00:00 
> heroku[router]: at=error code=H10 desc="App crashed" method=GET 
> path="/" host=unt-safe.herokuapp.com 
> request_id=28d89480-8c81-4100-aef1-4cddff501714 fwd="97.94.197.248" 
> dyno= connect= service= status=503 bytes= 
> 2016-04-27T17:06:51.875582+00:00 heroku[router]: at=error code=H10 
> desc="App crashed" method=GET path="/favicon.ico" 
> host=unt-safe.herokuapp.com 
> request_id=67090db5-b562-4ea4-92e6-22a7ba17df81 fwd="97.94.197.248" 
> dyno= connect= service= status=503 bytes= 

sessions_controller.rb:

> class registrations::sessionsController < Devise::sessionsController 
> 
> @users = User.all @hash = Gmaps4rails.build_markers(@users) do |user, 
> marker| marker.lat user.latitude marker.lng user.longitude end 
> end 
+0

ログファイルのスキャンと読み取りが非常に困難です。元に改行してコピー&ペーストしてください。 – spickermann

+0

あなたのsessions_controller投稿は –

答えて

0

これが問題である:

Rubyで
! Unable to load application: 
SyntaxError: /app/app/controllers/registrations/sessions_controller.rb:1: 
class/module name must be CONSTANT 

、定数は大文字で始まっていますが、中にあなたのコントローラを定義しました小文字:

registrations::sessionsController < Devise::sessionsController 

は、それが適切に大文字にしてください:あなたはrails sを実行したときに

Registrations::SessionsController < Devise::SessionsController 

これと同じクラッシュが起こってローカルにする必要があります。再度展開する前に、それが動作するまで反復処理を続ける方が速くなります。

+0

ありがとうございます。私のアプリはローカルでうまく動作していますが、実際は奇妙です。私はこれを試してみましょう! – ArielSkye

+0

ローカル(devモード)Railsは必要になるまでセッションコントローラをロードしていない可能性がありますが、本番環境ではすべてが起動時にロードされます。セッションエンドポイントにヒットしてみて、問題を引き起こすことができるはずです。 –

関連する問題