ga-wdi-boston/rails-heroku-setup-guide

application error on heroku deploy

Closed this issue · 1 comments

I'm getting an application error when I deploy my back end to heroku.

Application Error

An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

I'm not sure what I did wrong.
I've followed the rails-api-template installation instructions and I've followed the rails-deployment-heroku-guide.

here are the heroku logs:

david@david-Satellite-C55D-B:~/wdi/projects/FreeTime-Back-End$ heroku logs
2016-09-26T14:42:28.666125+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
2016-09-26T14:42:28.666127+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
2016-09-26T14:42:28.666128+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
2016-09-26T14:42:28.666130+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
2016-09-26T14:42:28.666169+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
2016-09-26T14:42:28.666170+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
2016-09-26T14:42:28.666173+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2016-09-26T14:42:28.666173+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
2016-09-26T14:42:28.666174+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `block in require'
2016-09-26T14:42:28.666176+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
2016-09-26T14:42:28.666204+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
2016-09-26T14:42:28.666205+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
2016-09-26T14:42:28.666206+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
2016-09-26T14:42:28.666209+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
2016-09-26T14:42:28.666210+00:00 app[web.1]:    from /app/config.ru:in `new'
2016-09-26T14:42:28.666212+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2016-09-26T14:42:28.666229+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
2016-09-26T14:42:28.666230+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
2016-09-26T14:42:28.666232+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
2016-09-26T14:42:28.666233+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2016-09-26T14:42:28.666234+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
2016-09-26T14:42:28.666236+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/server.rb:61:in `app'
2016-09-26T14:42:28.666238+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
2016-09-26T14:42:28.666269+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
2016-09-26T14:42:28.666270+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/server.rb:80:in `start'
2016-09-26T14:42:28.666271+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2016-09-26T14:42:28.666272+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:75:in `server'
2016-09-26T14:42:28.666272+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
2016-09-26T14:42:28.666273+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-09-26T14:42:28.666274+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands.rb:17:in `<top (required)>'
2016-09-26T14:42:28.666274+00:00 app[web.1]:    from bin/rails:9:in `require'
2016-09-26T14:42:28.666276+00:00 app[web.1]:    from bin/rails:9:in `<main>'
2016-09-26T14:42:28.780280+00:00 heroku[web.1]: Process exited with status 1
2016-09-26T14:42:28.796369+00:00 heroku[web.1]: State changed from starting to crashed
2016-09-26T14:42:28.797579+00:00 heroku[web.1]: State changed from crashed to starting
2016-09-26T14:42:31.786914+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 43770 -e production`
2016-09-26T14:42:36.061990+00:00 heroku[web.1]: State changed from starting to crashed
2016-09-26T14:42:35.958215+00:00 app[web.1]: => Booting WEBrick
2016-09-26T14:42:35.958232+00:00 app[web.1]: => Rails 4.2.7.1 application starting in production on http://0.0.0.0:43770
2016-09-26T14:42:35.958233+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-09-26T14:42:35.958234+00:00 app[web.1]: => Ctrl-C to shutdown server
2016-09-26T14:42:35.958234+00:00 app[web.1]: Exiting
2016-09-26T14:42:35.958240+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:244:in `rescue in load_dependency': /app/app/controllers/resources_controller.rb:57: syntax error, unexpected ',', expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END (SyntaxError)
2016-09-26T14:42:35.958240+00:00 app[web.1]:       params.require(:resource).permit(:, :except, :[, :)
2016-09-26T14:42:35.958241+00:00 app[web.1]:                                          ^
2016-09-26T14:42:35.958242+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:237:in `load_dependency'
2016-09-26T14:42:35.958242+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
2016-09-26T14:42:35.958243+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:360:in `require_or_load'
2016-09-26T14:42:35.958244+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:317:in `depend_on'
2016-09-26T14:42:35.958244+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:233:in `require_dependency'
2016-09-26T14:42:35.958245+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
2016-09-26T14:42:35.958246+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:471:in `each'
2016-09-26T14:42:35.958247+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:471:in `block in eager_load!'
2016-09-26T14:42:35.958247+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:469:in `each'
2016-09-26T14:42:35.958248+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:469:in `eager_load!'
2016-09-26T14:42:35.958248+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:346:in `eager_load!'
2016-09-26T14:42:35.958251+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application/finisher.rb:56:in `each'
2016-09-26T14:42:35.958252+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2016-09-26T14:42:35.958253+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec'
2016-09-26T14:42:35.958253+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run'
2016-09-26T14:42:35.958254+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
2016-09-26T14:42:35.958255+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
2016-09-26T14:42:35.958256+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
2016-09-26T14:42:35.958256+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
2016-09-26T14:42:35.958257+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
2016-09-26T14:42:35.958258+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
2016-09-26T14:42:35.958258+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
2016-09-26T14:42:35.958260+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
2016-09-26T14:42:35.958261+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
2016-09-26T14:42:35.958261+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
2016-09-26T14:42:35.958262+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
2016-09-26T14:42:35.958262+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
2016-09-26T14:42:35.958263+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2016-09-26T14:42:35.958263+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
2016-09-26T14:42:35.958264+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `block in require'
2016-09-26T14:42:35.958265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
2016-09-26T14:42:35.958265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
2016-09-26T14:42:35.958266+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
2016-09-26T14:42:35.958266+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
2016-09-26T14:42:35.958267+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
2016-09-26T14:42:35.958267+00:00 app[web.1]:    from /app/config.ru:in `new'
2016-09-26T14:42:35.958268+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2016-09-26T14:42:35.958269+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
2016-09-26T14:42:35.958270+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
2016-09-26T14:42:35.958271+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
2016-09-26T14:42:35.958272+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2016-09-26T14:42:35.958273+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
2016-09-26T14:42:35.958274+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/server.rb:61:in `app'
2016-09-26T14:42:35.958275+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
2016-09-26T14:42:35.958276+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
2016-09-26T14:42:35.958278+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/server.rb:80:in `start'
2016-09-26T14:42:35.958295+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2016-09-26T14:42:35.958296+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
2016-09-26T14:42:35.958296+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:75:in `server'
2016-09-26T14:42:35.958296+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-09-26T14:42:35.958297+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands.rb:17:in `<top (required)>'
2016-09-26T14:42:35.958298+00:00 app[web.1]:    from bin/rails:9:in `require'
2016-09-26T14:42:35.958299+00:00 app[web.1]:    from bin/rails:9:in `<main>'
2016-09-26T14:42:36.046832+00:00 heroku[web.1]: Process exited with status 1
2016-09-26T14:42:37.113694+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fathomless-coast-53196.herokuapp.com request_id=767f123f-609b-4c36-b30c-7c0dad77ec03 fwd="74.118.24.163" dyno= connect= service= status=503 bytes=
2016-09-26T14:42:39.560574+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-coast-53196.herokuapp.com request_id=1670dc65-504b-4108-8a21-c178cace4bb0 fwd="74.118.24.163" dyno= connect= service= status=503 bytes=

This line in your params could be the issue:

params.require(:resource).permit(:, :except, :[, :)

Please post this in capstone-project however.