2

I get their error when I try to deploy my github app to heroku. Any Ideas on what this error means? When I go to the myapp.herokuapp.com url I get a default Application message "An error occurred in the application and your page could not be served. Please try again in a few moments."

2015-12-12T20:09:58.118155+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-12-12T20:09:58.144431+00:00 app[web.1]: => Booting WEBrick
2015-12-12T20:09:58.144435+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-12-12T20:09:58.144434+00:00 app[web.1]: => Rails 4.2.4 application starting in production on http://0.0.0.0:56551
2015-12-12T20:09:58.144436+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-12-12T20:10:00.089633+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=myapp.herokuapp.com request_id=5c027f8f6-edc9-130c-80e3-e09852315e1d5 fwd="90.252.159.121" dyno= connect= service= status=503 bytes=
2015-12-12T20:09:58.118155+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-12-12T20:09:58.144436+00:00 app[web.1]: Exiting
2015-12-12T20:09:58.144431+00:00 app[web.1]: => Booting WEBrick
2015-12-12T20:09:58.118153+00:00 app[web.1]: from bin/rails:8:in `require'
2015-12-12T20:09:58.144435+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-12-12T20:09:58.144434+00:00 app[web.1]: => Rails 4.2.4 application starting in production on http://0.0.0.0:56551
2015-12-12T20:09:58.144436+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-12-12T20:09:58.907129+00:00 heroku[web.1]: Process exited with status 1
2015-12-12T20:09:58.911994+00:00 heroku[web.1]: State changed from starting to crashed

UPDATE:

I ran heroku run rake db:migrate successfully and get an error that is a little different.

        2015-12-14T14:46:11.598744+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
    2015-12-14T14:46:11.598746+00:00 app[web.1]: from bin/rails:8:in `require'
    2015-12-14T14:46:11.632494+00:00 app[web.1]: => Rails 4.2.4 application starting in production on http://0.0.0.0:20732
    2015-12-14T14:46:12.680393+00:00 heroku[web.1]: State changed from starting to crashed
    2015-12-14T18:20:23.431655+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=myapp.herokuapp.com request_id=2ed5f19a-bc65-40b8-ac3b-574d46c35ece fwd="177.127.367.126" dyno= connect= service= status=503 bytes=
: Not found
: Not found
: Not found
: Not found
: Not found
: Not found
: Not found
: Not found
: Not found
now_world
  • 940
  • 7
  • 21
  • 56
  • 1
    If you add the repository, I will take a look on it. – Tobias Dec 12 '15 at 20:43
  • The github repo is private . Anyway I could solve this without posting the repository? Thanks – now_world Dec 12 '15 at 23:49
  • Can you start the server in development (on your own machine)? Is this your first deploy to Heroku? – max Dec 13 '15 at 05:44
  • Basically Rails is crashing on startup - the error is most likely somewhere in your config or initializers. The `heroku[router]:` line is Heroku serving the static error page which you saw in the browser. – max Dec 13 '15 at 05:49
  • Yes I can successfully start the server locally. And yes this is my first deploy to Heroku. Thanks for all the info – now_world Dec 13 '15 at 16:16
  • are you using postgres and pg gem in development? this post might be helpful ? http://stackoverflow.com/questions/13496827/heroku-deployment-error-h10-app-crashed – house9 Dec 14 '15 at 18:30

1 Answers1

2

Can't tell anything from the log, which suggests the problem is at environment level (you don't have the correct ENV var, or more likely, you don't have your database set up correctly).

As a rule of thumb, I've found Heroku to work quite well unless you forget to migrate your database.

--

I'll delete this answer if it's wrong, but you'll be best firing:

heroku run rake db:migrate

This will make sure you have the database set up in the Heroku environment. Whether it's the problem is another matter; I've found that 9/10 times, not having a db / not migrating the db in Heroku is the biggest reason for the application crashing.

Richard Peck
  • 76,116
  • 9
  • 93
  • 147
  • I ran the command you suggested and got a little different error. Please take a look at my update. Thank you – now_world Dec 14 '15 at 18:26