2016-04-27 7 views
0

Ich habe vor kurzem meine Rails App auf Heroku geschoben und einen Absturzfehler bekommen (Fehler H10 in den Logs). Ich kann nicht herausfinden, was falsch ist.Meine Heroku App stürzt ab (Fehler H10) und ich weiß nicht warum

Ich habe versucht heroku restart und löschen und neu zu implementieren meine App in Heroku. Zuerst bekam ich eine Warnung, als ich meinen Code nach Heroku schob, weil er kein Procfile finden konnte, also folgte ich these instructions, um Puma zu installieren, wie Heroku vorgeschlagen hatte.

Nicht sicher, warum das passiert, und ich kann nichts finden, das in anderen Threads gilt. Irgendwelche Ideen?

Meine Protokolle sind unten für den Kontext. Danke im Voraus!

> 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

Die Protokolldatei ist sehr schwer zu scannen und zu lesen. Kannst du es bitte nochmal kopieren und einfügen, aber mit der ursprünglichen Zeilenumbrüche an Ort und Stelle? – spickermann

+0

Senden Sie Ihre Sessions_Controller bitte –

Antwort

0

Das ist das Problem:

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

In Ruby Konstanten mit einem Großbuchstaben beginnen, aber Sie haben Ihren Controller definiert in Kleinbuchstaben:

registrations::sessionsController < Devise::sessionsController 

es richtig aktiviert Fabrikat:

Registrations::SessionsController < Devise::SessionsController 

Das gleiche Absturz sollte lokal geschehen, wenn Sie rails s laufen. Es wird schneller sein, bis es funktioniert, bevor Sie es erneut bereitstellen.

+0

Danke für diese Info. Meine App funktioniert lokal einwandfrei, das ist seltsam. Ich werde das aber versuchen! – ArielSkye

+0

Lokal (im Entwicklungsmodus) Rails laden den Session Controller möglicherweise erst, wenn er benötigt wird, aber in der Produktion wird alles beim Booten geladen. Versuchen Sie, einen Sitzungsendpunkt zu treffen, und Sie sollten das Problem lösen können. –

Verwandte Themen