I am having an issue with my web application opening after being pushed to Heroku from Ruby on Rails. When I test out my application within the cloud9 ide it opens and works perfectly. However when I try to open it after merging all the branches to the master and pushing both the master to git and to Heroku I get this:
https://limitless-fortress-32820.herokuapp.com/
I am unsure how to fix this. Any advice?
This is what the logs say:
2017-03-11T02:43:48.982178+00:00 app[web.1]: D, [2017-03-11T02:43:48.982112 #4] DEBUG -- : [9828508f-52fc-489a-9bda-d680b05f1c28] Plan Load (0.7ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2017-03-11T02:43:48.983225+00:00 app[web.1]: D, [2017-03-11T02:43:48.983167 #4] DEBUG -- : [9828508f-52fc-489a-9bda-d680b05f1c28] Plan Load (0.6ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2017-03-11T02:43:48.983770+00:00 app[web.1]: I, [2017-03-11T02:43:48.983713 #4] INFO -- : [9828508f-52fc-489a-9bda-d680b05f1c28] Completed 404 Not Found in 3ms (ActiveRecord: 1.4ms)
2017-03-11T02:43:48.984196+00:00 app[web.1]: F, [2017-03-11T02:43:48.984142 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28]
2017-03-11T02:43:48.984248+00:00 app[web.1]: F, [2017-03-11T02:43:48.984196 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3):
2017-03-11T02:43:48.984296+00:00 app[web.1]: F, [2017-03-11T02:43:48.984249 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28]
2017-03-11T02:43:48.984347+00:00 app[web.1]: F, [2017-03-11T02:43:48.984296 #4] FATAL -- : [9828508f-52fc-489a-9bda-d680b05f1c28] app/controllers/pages_controller.rb:5:in `home'
2017-03-11T03:20:33.758477+00:00 heroku[web.1]: Idling
2017-03-11T03:20:33.759144+00:00 heroku[web.1]: State changed from up to down
2017-03-11T03:20:34.554844+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-03-11T03:20:34.566891+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-03-11T03:20:34.566983+00:00 app[web.1]: === puma shutdown: 2017-03-11 03:20:34 +0000 ===
2017-03-11T03:20:34.566987+00:00 app[web.1]: - Goodbye!
2017-03-11T03:20:34.567392+00:00 app[web.1]: Exiting
2017-03-11T03:20:34.775834+00:00 heroku[web.1]: Process exited with status 0
2017-03-11T05:25:57.075991+00:00 heroku[web.1]: Unidling
2017-03-11T05:25:57.076291+00:00 heroku[web.1]: State changed from down to starting
2017-03-11T05:26:01.138390+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 56896 -e production`
2017-03-11T05:26:06.849508+00:00 app[web.1]: => Booting Puma
2017-03-11T05:26:06.849544+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:56896
2017-03-11T05:26:06.849552+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-03-11T05:26:07.935302+00:00 app[web.1]: Puma starting in single mode...
2017-03-11T05:26:07.935323+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-03-11T05:26:07.935324+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-03-11T05:26:07.935325+00:00 app[web.1]: * Environment: production
2017-03-11T05:26:07.935466+00:00 app[web.1]: * Listening on tcp://0.0.0.0:56896
2017-03-11T05:26:07.935709+00:00 app[web.1]: Use Ctrl-C to stop
2017-03-11T05:26:08.316445+00:00 heroku[web.1]: State changed from starting to up
2017-03-11T05:26:11.211047+00:00 app[web.1]: I, [2017-03-11T05:26:11.210942 #4] INFO -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Started HEAD "/" for 184.72.76.14 at 2017-03-11 05:26:11 +0000
2017-03-11T05:26:11.214433+00:00 app[web.1]: I, [2017-03-11T05:26:11.214374 #4] INFO -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Processing by PagesController#home as HTML
2017-03-11T05:26:11.243975+00:00 app[web.1]: D, [2017-03-11T05:26:11.243829 #4] DEBUG -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Plan Load (0.9ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2017-03-11T05:26:11.257064+00:00 app[web.1]: D, [2017-03-11T05:26:11.256920 #4] DEBUG -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Plan Load (0.7ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2017-03-11T05:26:11.257752+00:00 app[web.1]: I, [2017-03-11T05:26:11.257692 #4] INFO -- : [d795b023-4103-41a2-8825-ecb50be24fdd] Completed 404 Not Found in 43ms (ActiveRecord: 7.9ms)
2017-03-11T05:26:11.258611+00:00 app[web.1]: F, [2017-03-11T05:26:11.258542 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd]
2017-03-11T05:26:11.258689+00:00 app[web.1]: F, [2017-03-11T05:26:11.258627 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3):
2017-03-11T05:26:11.258744+00:00 app[web.1]: F, [2017-03-11T05:26:11.258692 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd]
2017-03-11T05:26:11.258855+00:00 app[web.1]: F, [2017-03-11T05:26:11.258746 #4] FATAL -- : [d795b023-4103-41a2-8825-ecb50be24fdd] app/controllers/pages_controller.rb:5:in `home'
2017-03-11T05:26:11.258728+00:00 heroku[router]: at=info method=HEAD path="/" host=limitless-fortress-32820.herokuapp.com request_id=d795b023-4103-41a2-8825-ecb50be24fdd fwd="184.72.76.14" dyno=web.1 connect=12ms service=118ms status=404 bytes=180 protocol=https
2017-03-11T05:58:12.552944+00:00 heroku[web.1]: Idling
2017-03-11T05:58:12.553609+00:00 heroku[web.1]: State changed from up to down
2017-03-11T05:58:13.333628+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-03-11T05:58:13.379474+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-03-11T05:58:13.379914+00:00 app[web.1]: === puma shutdown: 2017-03-11 05:58:13 +0000 ===
2017-03-11T05:58:13.379919+00:00 app[web.1]: - Goodbye!
2017-03-11T05:58:13.380079+00:00 app[web.1]: Exiting
2017-03-11T05:58:13.710764+00:00 heroku[web.1]: Process exited with status 0
2017-03-11T07:27:27.616986+00:00 heroku[web.1]: Unidling
2017-03-11T07:27:27.617784+00:00 heroku[web.1]: State changed from down to starting
2017-03-11T07:27:30.484604+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 53485 -e production`
2017-03-11T07:27:34.063443+00:00 app[web.1]: => Booting Puma
2017-03-11T07:27:34.063485+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:53485
2017-03-11T07:27:34.063487+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-03-11T07:27:34.745431+00:00 app[web.1]: Puma starting in single mode...
2017-03-11T07:27:34.745451+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-03-11T07:27:34.745452+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-03-11T07:27:34.745453+00:00 app[web.1]: * Environment: production
2017-03-11T07:27:34.745551+00:00 app[web.1]: * Listening on tcp://0.0.0.0:53485
2017-03-11T07:27:34.745760+00:00 app[web.1]: Use Ctrl-C to stop
2017-03-11T07:27:35.323498+00:00 heroku[web.1]: State changed from starting to up
2017-03-11T07:27:36.716062+00:00 heroku[router]: at=info method=GET path="/" host=limitless-fortress-32820.herokuapp.com request_id=3034176c-dd58-4af0-8f70-745f440273db fwd="125.62.127.212" dyno=web.1 connect=0ms service=67ms status=404 bytes=1744 protocol=https
2017-03-11T07:27:36.683610+00:00 app[web.1]: I, [2017-03-11T07:27:36.683527 #4] INFO -- : [3034176c-dd58-4af0-8f70-745f440273db] Started GET "/" for 125.62.127.212 at 2017-03-11 07:27:36 +0000
2017-03-11T07:27:36.686611+00:00 app[web.1]: I, [2017-03-11T07:27:36.686528 #4] INFO -- : [3034176c-dd58-4af0-8f70-745f440273db] Processing by PagesController#home as HTML
2017-03-11T07:27:36.705959+00:00 app[web.1]: D, [2017-03-11T07:27:36.705867 #4] DEBUG -- : [3034176c-dd58-4af0-8f70-745f440273db] Plan Load (0.6ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2017-03-11T07:27:36.715238+00:00 app[web.1]: D, [2017-03-11T07:27:36.715149 #4] DEBUG -- : [3034176c-dd58-4af0-8f70-745f440273db] Plan Load (2.1ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2017-03-11T07:27:36.715738+00:00 app[web.1]: I, [2017-03-11T07:27:36.715679 #4] INFO -- : [3034176c-dd58-4af0-8f70-745f440273db] Completed 404 Not Found in 29ms (ActiveRecord: 8.8ms)
2017-03-11T07:27:36.716195+00:00 app[web.1]: F, [2017-03-11T07:27:36.716134 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db]
2017-03-11T07:27:36.716273+00:00 app[web.1]: F, [2017-03-11T07:27:36.716193 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3):
2017-03-11T07:27:36.716324+00:00 app[web.1]: F, [2017-03-11T07:27:36.716271 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db]
2017-03-11T07:27:36.716375+00:00 app[web.1]: F, [2017-03-11T07:27:36.716321 #4] FATAL -- : [3034176c-dd58-4af0-8f70-745f440273db] app/controllers/pages_controller.rb:5:in `home'
2017-03-11T07:27:37.337320+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=limitless-fortress-32820.herokuapp.com request_id=20bb1588-0933-4517-9605-0fdac9f274af fwd="125.62.127.212" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2017-03-11T08:01:45.234016+00:00 heroku[web.1]: Idling
2017-03-11T08:01:45.234777+00:00 heroku[web.1]: State changed from up to down
2017-03-11T08:01:46.059828+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-03-11T08:01:46.113060+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-03-11T08:01:46.113197+00:00 app[web.1]: === puma shutdown: 2017-03-11 08:01:46 +0000 ===
2017-03-11T08:01:46.113203+00:00 app[web.1]: - Goodbye!
2017-03-11T08:01:46.113318+00:00 app[web.1]: Exiting
2017-03-11T08:01:46.472377+00:00 heroku[web.1]: Process exited with status 0
2017-03-11T16:26:53.013220+00:00 heroku[web.1]: Unidling
2017-03-11T16:26:53.013532+00:00 heroku[web.1]: State changed from down to starting
2017-03-11T16:26:55.743205+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 42518 -e production`
2017-03-11T16:26:59.184085+00:00 app[web.1]: => Booting Puma
2017-03-11T16:26:59.184112+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:42518
2017-03-11T16:26:59.184113+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-03-11T16:26:59.813953+00:00 app[web.1]: Puma starting in single mode...
2017-03-11T16:26:59.813978+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-03-11T16:26:59.814009+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-03-11T16:26:59.814025+00:00 app[web.1]: * Environment: production
2017-03-11T16:26:59.814139+00:00 app[web.1]: * Listening on tcp://0.0.0.0:42518
2017-03-11T16:26:59.814338+00:00 app[web.1]: Use Ctrl-C to stop
2017-03-11T16:27:00.213490+00:00 heroku[web.1]: State changed from starting to up
2017-03-11T16:27:01.161259+00:00 heroku[router]: at=info method=GET path="/" host=limitless-fortress-32820.herokuapp.com request_id=0394b2a7-1f84-42a8-9f38-5093385535b9 fwd="68.113.158.107,66.249.88.31" dyno=web.1 connect=1ms service=77ms status=404 bytes=1744 protocol=https
2017-03-11T16:27:01.104510+00:00 app[web.1]: I, [2017-03-11T16:27:01.104407 #4] INFO -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Started GET "/" for 66.249.88.31 at 2017-03-11 16:27:01 +0000
2017-03-11T16:27:01.107677+00:00 app[web.1]: I, [2017-03-11T16:27:01.107612 #4] INFO -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Processing by PagesController#home as HTML
2017-03-11T16:27:01.138947+00:00 app[web.1]: D, [2017-03-11T16:27:01.138843 #4] DEBUG -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Plan Load (2.7ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2017-03-11T16:27:01.144670+00:00 app[web.1]: D, [2017-03-11T16:27:01.144594 #4] DEBUG -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Plan Load (1.0ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2017-03-11T16:27:01.145093+00:00 app[web.1]: I, [2017-03-11T16:27:01.145032 #4] INFO -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] Completed 404 Not Found in 37ms (ActiveRecord: 16.8ms)
2017-03-11T16:27:01.145493+00:00 app[web.1]: F, [2017-03-11T16:27:01.145437 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9]
2017-03-11T16:27:01.145518+00:00 app[web.1]: F, [2017-03-11T16:27:01.145485 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] ActiveRecord::RecordNotFound (Couldn't find Plan with 'id'=3):
2017-03-11T16:27:01.145558+00:00 app[web.1]: F, [2017-03-11T16:27:01.145518 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9]
2017-03-11T16:27:01.145592+00:00 app[web.1]: F, [2017-03-11T16:27:01.145552 #4] FATAL -- : [0394b2a7-1f84-42a8-9f38-5093385535b9] app/controllers/pages_controller.rb:5:in `home'
I am unfamiliar with deciphering what this means. This is my first application.
Have you run all the migrations and set up the environment variables? Enable Papertrail on your site. Then you can view the logs which should show what the error is.
The best way to see whats happening here is by reading the logs. You can do this by running:
heroku logs -a limitless-fortress-32820 (or whatever you named your app)
You would do this in your commandline and this assumes that you have the heroku cli tools installed.
Check for the error the log is displaying and go from there. It could be a procfile, environmental variable issue, migration issue or any number of things.
To check heroku logs in real time:
heroku logs -t -a limitless-fortress-32820
Check following to resolve issues:
1. Have you used PG database?
2. Is all Migration file run?
Related
I signed up on my rails app on heroku and get the following error on my heroku logs. Meanwhile, the user has been saved to the database.
Anyone with advise on how to proceed pls. I am using devise gem, tried both Puma and Thin servers. Still get the same error. App location is at: https://naijasinglesmeet.herokuapp.com
Sign up for an account and this is what I get in my logs below:
Please advise
2019-10-08T19:55:38.458871+00:00 app[web.1]: I, [2019-10-08T19:55:26.203972 #4] INFO -- : [41600c35-8749-48f2-9c8a-8428f4a92dea] Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.0ms)
2019-10-08T19:55:38.458873+00:00 app[web.1]: I, [2019-10-08T19:55:38.298348 #4] INFO -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] Started POST "/users" for 41.217.104.185 at 2019-10-08 19:55:38 +0000
2019-10-08T19:55:38.458875+00:00 app[web.1]: I, [2019-10-08T19:55:38.299628 #4] INFO -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] Processing by RegistrationsController#create as HTML
2019-10-08T19:55:38.45889+00:00 app[web.1]: I, [2019-10-08T19:55:38.299753 #4] INFO -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] Parameters: {"utf8"=>"✓", "authenticity_token"=>"amK9Wje7yZ2DJDtylpzVrY9HrYgc7pmtBMnbl/lrdU5/dW+A00CGgDAW8uAtyfiUDF0tvSZtCt56gOeZsmO+mA==", "user"=>{"username"=>"iamyinka", "first_name"=>"Yinka", "last_name"=>"Ash", "email"=>"iamhere#yinka.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}
2019-10-08T19:55:38.458892+00:00 app[web.1]: D, [2019-10-08T19:55:38.458466 #4] DEBUG -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] (0.7ms) BEGIN
2019-10-08T19:55:38.993261+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=naijasinglesmeet.herokuapp.com request_id=6561ef3b-42df-48a4-a227-6d9aa163b5c9 fwd="41.217.104.185" dyno=web.1 connect=0ms service=1ms status=304 bytes=62 protocol=https
2019-10-08T19:55:41.320556+00:00 heroku[web.1]: source=web.1 dyno=heroku.148955966.114d5aad-5be9-43d4-9b68-1c16025c2349 sample#load_avg_1m=0.02
2019-10-08T19:55:41.348659+00:00 heroku[web.1]: source=web.1 dyno=heroku.148955966.114d5aad-5be9-43d4-9b68-1c16025c2349 sample#memory_total=79.79MB sample#memory_rss=79.75MB sample#memory_cache=0.04MB sample#memory_swap=0.00MB sample#memory_pgpgin=29231pages sample#memory_pgpgout=8805pages sample#memory_quota=512.00MB
2019-10-08T19:56:02.581435+00:00 heroku[web.1]: source=web.1 dyno=heroku.148955966.114d5aad-5be9-43d4-9b68-1c16025c2349 sample#load_avg_1m=0.01
2019-10-08T19:56:02.606547+00:00 heroku[web.1]: source=web.1 dyno=heroku.148955966.114d5aad-5be9-43d4-9b68-1c16025c2349 sample#memory_total=79.76MB sample#memory_rss=79.75MB sample#memory_cache=0.01MB sample#memory_swap=0.00MB sample#memory_pgpgin=29231pages sample#memory_pgpgout=8813pages sample#memory_quota=512.00MB
2019-10-08T19:56:22.544894+00:00 heroku[web.1]: source=web.1 dyno=heroku.148955966.114d5aad-5be9-43d4-9b68-1c16025c2349 sample#load_avg_1m=0.01
2019-10-08T19:56:22.576747+00:00 heroku[web.1]: source=web.1 dyno=heroku.148955966.114d5aad-5be9-43d4-9b68-1c16025c2349 sample#memory_total=79.76MB sample#memory_rss=79.75MB sample#memory_cache=0.01MB sample#memory_swap=0.00MB sample#memory_pgpgin=29231pages sample#memory_pgpgout=8813pages sample#memory_quota=512.00MB
2019-10-08T19:56:43.65213+00:00 heroku[web.1]: source=web.1 dyno=heroku.148955966.114d5aad-5be9-43d4-9b68-1c16025c2349 sample#load_avg_1m=0.01 sample#load_avg_5m=0.03
2019-10-08T19:56:43.68744+00:00 heroku[web.1]: source=web.1 dyno=heroku.148955966.114d5aad-5be9-43d4-9b68-1c16025c2349 sample#memory_total=79.76MB sample#memory_rss=79.75MB sample#memory_cache=0.01MB sample#memory_swap=0.00MB sample#memory_pgpgin=29231pages sample#memory_pgpgout=8813pages sample#memory_quota=512.00MB
Hi guys.... Here's an update... finally, I see something come up...
2019-10-08T20:25:08.263845+00:00 app[web.1]: D, [2019-10-08T19:55:38.481415 #4] DEBUG -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] (1.9ms) COMMIT
2019-10-08T20:25:08.263848+00:00 app[web.1]: I, [2019-10-08T19:55:38.492062 #4] INFO -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] Rendering devise/mailer/confirmation_instructions.html.erb
2019-10-08T20:25:08.26385+00:00 app[web.1]: I, [2019-10-08T19:55:38.494157 #4] INFO -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] Rendered devise/mailer/confirmation_instructions.html.erb (2.0ms)
2019-10-08T20:25:08.263853+00:00 app[web.1]: D, [2019-10-08T19:55:38.494327 #4] DEBUG -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] Devise::Mailer#confirmation_instructions: processed outbound mail in 12.1ms
2019-10-08T20:25:08.263855+00:00 app[web.1]: I, [2019-10-08T19:55:38.494606 #4] INFO -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] Completed 500 Internal Server Error in 195ms (ActiveRecord: 14.8ms)
2019-10-08T20:25:08.263857+00:00 app[web.1]: F, [2019-10-08T19:55:38.496369 #4] FATAL -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67]
2019-10-08T20:25:08.26386+00:00 app[web.1]: F, [2019-10-08T19:55:38.496444 #4] FATAL -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] ActionView::Template::Error (Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true):
2019-10-08T20:25:08.263862+00:00 app[web.1]: F, [2019-10-08T19:55:38.496669 #4] FATAL -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] 2:
2019-10-08T20:25:08.263864+00:00 app[web.1]: [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] 3: <p>You can confirm your account email through the link below:</p>
2019-10-08T20:25:08.263866+00:00 app[web.1]: [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] 4:
2019-10-08T20:25:08.263867+00:00 app[web.1]: [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] 5: <p><%= link_to 'Confirm my account', confirmation_url(#resource, confirmation_token: #token) %></p>
2019-10-08T20:25:08.263869+00:00 app[web.1]: F, [2019-10-08T19:55:38.496775 #4] FATAL -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67]
2019-10-08T20:25:08.26387+00:00 app[web.1]: F, [2019-10-08T19:55:38.496845 #4] FATAL -- : [bf3b49db-ec4a-4bde-ae56-c5ae727b5f67] app/views/devise/mailer/confirmation_instructions.html.erb:5:in `_app_views_devise_mailer_confirmation_instructions_html_erb__3272380372352870108_47027054750980'
The relevant part of the error message is the following:
[2019-10-08T19:55:38.492062 #4] Rendering devise/mailer/confirmation_instructions.html.erb
[2019-10-08T19:55:38.496444 #4] FATAL -- :ActionView::Template::Error (Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true):
So you mailing template is trying to render, but throws an ActionView::Template::Error and actually tells you the problem:
Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true)
So you are using a link_to in your email, that one of course has to know the hostname, in order to create a full url. So you need to define that hostname somewhere.
For example you can set it in config/environments/production.rb by including
config.action_controller.default_url_options = {:host => "naijasinglesmeet.herokuapp.com"}
This is because your application does not know under which host/domain it is running, you have to tell it that.
A little tip, if you run into such problems, run heroku logs --tail, this will give you a continous logs as if you were using the development server.
I have a problem with my Rails app.
App based on Ruby on Rails with Sidekiq, Redis and deployed on Heroku.
I don't know why my worker doesn't work on Heroku. I think something is wrong in my settings.
config/initializers/sidekiq.rb
Sidekiq.configure_server do |config|
config.redis = { url: 'redis://localhost:6379/0' }
schedule_file = "config/sidekiq.yml"
if File.exists?(schedule_file)
Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file)
end
end
Sidekiq.configure_client do |config|
config.redis = { url: 'redis://localhost:6379/0' }
end
workers/my_worker.rb
class MyWorker
include Sidekiq::Worker
def perform
......
end
end
config/sidekiq.yml
my_photos:
cron: "30 3 */2 * *"
class: "MyWorker"
queue: default
Procfile
web: bundle exec rails server -p $PORT
worker: bundle exec sidekiq -e production
application.rb includes line:
config.active_job.queue_adapter = :sidekiq
I have installed Redis To Go on Heroku.
Heroku config:
REDISTOGO_URL: redis://redistogo:2085d9ff......
REDIS_PROVIDER: REDISTOGO_URL
.
.
.
Everything works fine on localhost development and production mode (worker too) but on Heroku worker doesn't work well.
Some errors:
Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)
heroku ps in console displays:
=== web (Free): bundle exec rails server -p $PORT (1)
web.1: up 2019/09/18 16:57:03 +0200
=== worker (Free): bundle exec sidekiq -e production (1)
worker.1: crashed 2019/09/18 17:27:42 +0200
Yes, I restarted Heroku.
***
Heroku logs after change config.redis to ENV['REDISTOGO_URL'] in sidekiq.rb
2019-09-18T16:29:30.621771+00:00 app[web.1]: => Booting Puma
2019-09-18T16:29:30.621789+00:00 app[web.1]: => Rails 5.2.3 application starting in production
2019-09-18T16:29:30.62179+00:00 app[web.1]: => Run `rails server -h` for more startup options
2019-09-18T16:29:30.621791+00:00 app[web.1]: Puma starting in single mode...
2019-09-18T16:29:30.621792+00:00 app[web.1]: * Version 3.12.1 (ruby 2.6.1-p33), codename: Llamas in Pajamas
2019-09-18T16:29:30.621793+00:00 app[web.1]: * Min threads: 5, max threads: 5
2019-09-18T16:29:30.621796+00:00 app[web.1]: * Environment: production
2019-09-18T16:29:30.621797+00:00 app[web.1]: * Listening on tcp://0.0.0.0:42164
2019-09-18T16:29:30.621798+00:00 app[web.1]: Use Ctrl-C to stop
2019-09-18T16:29:30.621799+00:00 app[web.1]: I, [2019-09-18T16:29:30.621672 #4] INFO -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:30 +0000
2019-09-18T16:29:30.62264+00:00 app[web.1]: I, [2019-09-18T16:29:30.622583 #4] INFO -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Processing by DogsController#index as HTML
2019-09-18T16:29:30.683193+00:00 app[web.1]: D, [2019-09-18T16:29:30.683061 #4] DEBUG -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] User Load (1.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T16:29:30.704369+00:00 app[web.1]: I, [2019-09-18T16:29:30.704248 #4] INFO -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Rendering dogs/index.html.erb within layouts/application
2019-09-18T16:29:30.708316+00:00 app[web.1]: D, [2019-09-18T16:29:30.708230 #4] DEBUG -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Dog Load (1.5ms) SELECT "dogs".* FROM "dogs" ORDER BY created_at DESC LIMIT $1 OFFSET $2 [["LIMIT", 24], ["OFFSET", 0]]
2019-09-18T16:29:30.715597+00:00 app[web.1]: I, [2019-09-18T16:29:30.715534 #4] INFO -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Rendered dogs/index.html.erb within layouts/application (11.2ms)
2019-09-18T16:29:30.718909+00:00 app[web.1]: I, [2019-09-18T16:29:30.718852 #4] INFO -- : [2fa14d58-5519-456e-a527-9cf4ed462e86] Completed 200 OK in 96ms (Views: 13.8ms | ActiveRecord: 28.1ms)
2019-09-18T16:29:32.200757+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=myappaddress.herokuapp.com request_id=77ecb62d-e044-4eee-be8c-a0f0749af788 fwd="195.136.56.0" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2019-09-18T16:29:32.047254+00:00 app[web.1]: I, [2019-09-18T16:29:32.047168 #4] INFO -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:32 +0000
2019-09-18T16:29:32.047891+00:00 app[web.1]: I, [2019-09-18T16:29:32.047835 #4] INFO -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Processing by DogsController#index as HTML
2019-09-18T16:29:32.051783+00:00 app[web.1]: D, [2019-09-18T16:29:32.051719 #4] DEBUG -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T16:29:32.053487+00:00 app[web.1]: I, [2019-09-18T16:29:32.053403 #4] INFO -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Rendering dogs/index.html.erb within layouts/application
2019-09-18T16:29:32.054812+00:00 app[web.1]: D, [2019-09-18T16:29:32.054749 #4] DEBUG -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Dog Load (1.0ms) SELECT "dogs".* FROM "dogs" ORDER BY created_at DESC LIMIT $1 OFFSET $2 [["LIMIT", 24], ["OFFSET", 0]]
2019-09-18T16:29:32.055346+00:00 app[web.1]: I, [2019-09-18T16:29:32.055289 #4] INFO -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Rendered dogs/index.html.erb within layouts/application (1.8ms)
2019-09-18T16:29:32.056958+00:00 app[web.1]: I, [2019-09-18T16:29:32.056901 #4] INFO -- : [2bfdeee1-c974-4a9e-97ac-659f58d14a0d] Completed 200 OK in 9ms (Views: 2.7ms | ActiveRecord: 1.9ms)
2019-09-18T16:29:32.059156+00:00 heroku[router]: at=info method=GET path="/dogs" host=myappaddress.herokuapp.com request_id=2bfdeee1-c974-4a9e-97ac-659f58d14a0d fwd="195.136.56.0" dyno=web.1 connect=0ms service=14ms status=200 bytes=2828 protocol=https
2019-09-18T16:29:33.373311+00:00 heroku[router]: at=info method=GET path="/dogs" host=myappaddress.herokuapp.com request_id=953acff7-12c6-4876-99eb-57686a8e054b fwd="195.136.56.0" dyno=web.1 connect=0ms service=15ms status=200 bytes=2850 protocol=https
2019-09-18T16:29:33.360115+00:00 app[web.1]: I, [2019-09-18T16:29:33.360015 #4] INFO -- : [953acff7-12c6-4876-99eb-57686a8e054b] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:33 +0000
2019-09-18T16:29:33.360839+00:00 app[web.1]: I, [2019-09-18T16:29:33.360763 #4] INFO -- : [953acff7-12c6-4876-99eb-57686a8e054b] Processing by DogsController#index as HTML
2019-09-18T16:29:33.364996+00:00 app[web.1]: D, [2019-09-18T16:29:33.364927 #4] DEBUG -- : [953acff7-12c6-4876-99eb-57686a8e054b] User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T16:29:33.36734+00:00 app[web.1]: I, [2019-09-18T16:29:33.367264 #4] INFO -- : [953acff7-12c6-4876-99eb-57686a8e054b] Rendering dogs/index.html.erb within layouts/application
2019-09-18T16:29:33.368712+00:00 app[web.1]: D, [2019-09-18T16:29:33.368637 #4] DEBUG -- : [953acff7-12c6-4876-99eb-57686a8e054b] Dog Load (1.0ms) SELECT "dogs".* FROM "dogs" ORDER BY created_at DESC LIMIT $1 OFFSET $2 [["LIMIT", 24], ["OFFSET", 0]]
2019-09-18T16:29:33.370049+00:00 app[web.1]: I, [2019-09-18T16:29:33.369947 #4] INFO -- : [953acff7-12c6-4876-99eb-57686a8e054b] Rendered dogs/index.html.erb within layouts/application (2.6ms)
2019-09-18T16:29:33.371552+00:00 app[web.1]: I, [2019-09-18T16:29:33.371479 #4] INFO -- : [953acff7-12c6-4876-99eb-57686a8e054b] Completed 200 OK in 10ms (Views: 2.8ms | ActiveRecord: 1.9ms)
2019-09-18T16:29:33.506177+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=myappaddress.herokuapp.com request_id=11c98ea8-5df1-4a9f-9a5a-fb609bf1f9b1 fwd="195.136.56.0" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2019-09-18T16:29:37.398927+00:00 heroku[web.1]: source=web.1 dyno=heroku.146423817.b27d01ed-7668-4c8c-9451-68f3c0f447c7 sample#memory_total=143.53MB sample#memory_rss=104.20MB sample#memory_cache=39.34MB sample#memory_swap=0.00MB sample#memory_pgpgin=51710pages sample#memory_pgpgout=14966pages sample#memory_quota=512.00MB
2019-09-18T16:29:54.267638+00:00 app[api]: Starting process with command `bin/rails console` by user myemail#o2.pl
2019-09-18T16:29:55.487272+00:00 heroku[router]: at=info method=GET path="/dogs" host=myappaddress.herokuapp.com request_id=4318929d-efc2-4ad1-ad0d-c0a9ae155a8c fwd="195.136.56.0" dyno=web.1 connect=0ms service=14ms status=200 bytes=2840 protocol=https
2019-09-18T16:29:55.474089+00:00 app[web.1]: I, [2019-09-18T16:29:55.473957 #4] INFO -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:55 +0000
2019-09-18T16:29:55.475425+00:00 app[web.1]: I, [2019-09-18T16:29:55.475356 #4] INFO -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Processing by DogsController#index as HTML
2019-09-18T16:29:55.478716+00:00 app[web.1]: D, [2019-09-18T16:29:55.478637 #4] DEBUG -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T16:29:55.480624+00:00 app[web.1]: I, [2019-09-18T16:29:55.480549 #4] INFO -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Rendering dogs/index.html.erb within layouts/application
2019-09-18T16:29:55.481962+00:00 app[web.1]: D, [2019-09-18T16:29:55.481884 #4] DEBUG -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Dog Load (1.0ms) SELECT "dogs".* FROM "dogs" ORDER BY created_at DESC LIMIT $1 OFFSET $2 [["LIMIT", 24], ["OFFSET", 0]]
2019-09-18T16:29:55.483895+00:00 app[web.1]: I, [2019-09-18T16:29:55.483823 #4] INFO -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Rendered dogs/index.html.erb within layouts/application (3.2ms)
2019-09-18T16:29:55.484818+00:00 app[web.1]: I, [2019-09-18T16:29:55.484747 #4] INFO -- : [4318929d-efc2-4ad1-ad0d-c0a9ae155a8c] Completed 200 OK in 9ms (Views: 3.4ms | ActiveRecord: 2.0ms)
2019-09-18T16:29:55.629132+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=myappaddress.herokuapp.com request_id=d2dc2b32-bf0c-42b0-b0ee-e688014a1858 fwd="195.136.56.0" dyno=web.1 connect=0ms service=2ms status=200 bytes=143 protocol=https
2019-09-18T16:29:56.6973+00:00 heroku[router]: at=info method=GET path="/dogs" host=myappaddress.herokuapp.com request_id=22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf fwd="195.136.56.0" dyno=web.1 connect=1ms service=14ms status=200 bytes=2850 protocol=https
2019-09-18T16:29:56.832815+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=myappaddress.herokuapp.com request_id=d76015da-381e-422d-8cfa-60d277ead4b8 fwd="195.136.56.0" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2019-09-18T16:29:56.683482+00:00 app[web.1]: I, [2019-09-18T16:29:56.683384 #4] INFO -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:56 +0000
2019-09-18T16:29:56.684878+00:00 app[web.1]: I, [2019-09-18T16:29:56.684813 #4] INFO -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Processing by DogsController#index as HTML
2019-09-18T16:29:56.688315+00:00 app[web.1]: D, [2019-09-18T16:29:56.688210 #4] DEBUG -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T16:29:56.690898+00:00 app[web.1]: I, [2019-09-18T16:29:56.690833 #4] INFO -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Rendering dogs/index.html.erb within layouts/application
2019-09-18T16:29:56.692612+00:00 app[web.1]: D, [2019-09-18T16:29:56.692550 #4] DEBUG -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Dog Load (1.1ms) SELECT "dogs".* FROM "dogs" ORDER BY created_at DESC LIMIT $1 OFFSET $2 [["LIMIT", 24], ["OFFSET", 0]]
2019-09-18T16:29:56.693963+00:00 app[web.1]: I, [2019-09-18T16:29:56.693898 #4] INFO -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Rendered dogs/index.html.erb within layouts/application (2.9ms)
2019-09-18T16:29:56.695684+00:00 app[web.1]: I, [2019-09-18T16:29:56.695620 #4] INFO -- : [22b98e70-0f07-4ac8-a93e-ba2d0df3ccbf] Completed 200 OK in 11ms (Views: 3.9ms | ActiveRecord: 2.2ms)
2019-09-18T16:29:58.295567+00:00 app[web.1]: I, [2019-09-18T16:29:58.295456 #4] INFO -- : [98a19c4a-cdda-4112-bb38-5869ede78b49] Started GET "/dogs" for 195.136.56.0 at 2019-09-18 16:29:58 +0000
2019-09-18T16:29:58.297473+00:00 app[web.1]: I, [2019-09-18T16:29:58.297393 #4] INFO -- : [98a19c4a-cdda-4112-bb38-5869ede78b49] Processing by DogsController#index as HTML
2019-09-18T16:29:58.301213+00:00 app[web.1]: D, [2019-09-18T16:29:58.301128 #4] DEBUG -- : [98a19c4a-cdda-4112-bb38-5869ede78b49] User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
2019-09-18T18:45:05.749467+00:00 heroku[web.1]: source=web.1 dyno=heroku.146423817.2c282eb9-e271-478a-a164-ab1ee7b48d15 sample#load_avg_1m=0.35
2019-09-18T18:45:05.779083+00:00 heroku[web.1]: source=web.1 dyno=heroku.146423817.2c282eb9-e271-478a-a164-ab1ee7b48d15 sample#memory_total=141.63MB sample#memory_rss=102.39MB sample#memory_cache=39.24MB sample#memory_swap=0.00MB sample#memory_pgpgin=51236pages sample#memory_pgpgout=14978pages sample#memory_quota=512.00MB
Sidekiq logs:
2019-09-18T21:42:34.875Z pid=2604 tid=gmvw62cjk class=FlickrWorker jid=d4d37c3accf6190b8193758d elapsed=5.561 INFO: fail
2019-09-18T21:42:34.875Z pid=2604 tid=gmvw62cjk WARN: {"context":"Job raised exception","job":{"queue":"default","args":[],"class":"FlickrWorker","retry":true,"jid":"d4d37c3accf6190b8193758d","created_at":1568805601.6104372,"enqueued_at":1568842949.307712,"error_message":"could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use","error_class":"ActiveRecord::ConnectionTimeoutError","failed_at":1568805607.190152,"retry_count":5,"retried_at":1568806408.705434},"jobstr":"{\"queue\":\"default\",\"args\":[],\"class\":\"FlickrWorker\",\"retry\":true,\"jid\":\"d4d37c3accf6190b8193758d\",\"created_at\":1568805601.6104372,\"enqueued_at\":1568842949.307712,\"error_message\":\"could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use\",\"error_class\":\"ActiveRecord::ConnectionTimeoutError\",\"failed_at\":1568805607.190152,\"retry_count\":5,\"retried_at\":1568806408.705434}"}
2019-09-18T21:42:34.875Z pid=2604 tid=gmvw62cjk WARN: ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use
2019-09-18T21:42:34.875Z pid=2604 tid=gmvw62cjk WARN: /home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:201:in `block in wait_poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `loop'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `wait_poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:151:in `internal_poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:277:in `internal_poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:145:in `block in poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:155:in `synchronize'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:145:in `poll'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:799:in `acquire_connection'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:523:in `checkout'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1014:in `retrieve_connection'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:90:in `connection'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/calculations.rb:196:in `block in pluck'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/calculations.rb:196:in `pluck'
/home/miro/ror/my-app/app/workers/flickr_worker.rb:11:in `block in perform'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/flickraw-0.9.10/lib/flickraw/response.rb:42:in `block in each'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/flickraw-0.9.10/lib/flickraw/response.rb:42:in `each'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/flickraw-0.9.10/lib/flickraw/response.rb:42:in `each'
/home/miro/ror/my-app/app/workers/flickr_worker.rb:11:in `reject'
/home/miro/ror/my-app/app/workers/flickr_worker.rb:11:in `perform'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:193:in `execute_job'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:161:in `block (2 levels) in process'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/middleware/chain.rb:134:in `invoke'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:160:in `block in process'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:133:in `block (6 levels) in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/job_retry.rb:107:in `local'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:132:in `block (5 levels) in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/rails.rb:43:in `block in call'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/execution_wrapper.rb:87:in `wrap'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/reloader.rb:73:in `block in wrap'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/execution_wrapper.rb:87:in `wrap'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/reloader.rb:72:in `wrap'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/rails.rb:42:in `call'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:128:in `block (4 levels) in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:254:in `stats'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:123:in `block (3 levels) in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/job_logger.rb:13:in `call'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:122:in `block (2 levels) in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/job_retry.rb:75:in `global'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:121:in `block in dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/logger.rb:16:in `with_context'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/job_logger.rb:27:in `with_job_hash_context'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:120:in `dispatch'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:159:in `process'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:78:in `process_one'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/processor.rb:68:in `run'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/util.rb:17:in `watchdog'
/home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/util.rb:26:in `block in safe_thread'
2019-09-18T21:42:34.876Z pid=2604 tid=ov922z8j8 class=FlickrWorker jid=73817a6886c934cc0e57d83c INFO: start
2019-09-18T21:42:34.907Z pid=2604 tid=gmvw62ctw class=FlickrWorker jid=f7a4c1d1e5da2939db1202ae elapsed=5.591 INFO: fail
2019-09-18T21:42:34.907Z pid=2604 tid=gmvw62ctw WARN: {"context":"Job raised exception","job":{"queue":"default","args":[],"class":"FlickrWorker","retry":true,"jid":"f7a4c1d1e5da2939db1202ae","created_at":1568806211.883125,"enqueued_at":1568842949.3102987,"error_message":"could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use","error_class":"ActiveRecord::ConnectionTimeoutError","failed_at":1568806217.393686,"retry_count":5,"retried_at":1568806883.9672208},"jobstr":"{\"queue\":\"default\",\"args\":[],\"class\":\"FlickrWorker\",\"retry\":true,\"jid\":\"f7a4c1d1e5da2939db1202ae\",\"created_at\":1568806211.883125,\"enqueued_at\":1568842949.3102987,\"error_message\":\"could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use\",\"error_class\":\"ActiveRecord::ConnectionTimeoutError\",\"failed_at\":1568806217.393686,\"retry_count\":5,\"retried_at\":1568806883.9672208}"}
2019-09-18T21:42:34.907Z pid=2604 tid=gmvw62ctw WARN: ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use
2019-09-18T21:42:34.908Z pid=2604 tid=gmvw62ctw WARN: /home/miro/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:201:in `block in wait_poll'
heroku logs | grep worker
2019-09-18T17:31:17.211968+00:00 heroku[worker.1]: Starting process with command `bundle exec sidekiq -e production`
2019-09-18T17:31:17.859475+00:00 heroku[worker.1]: State changed from starting to up
2019-09-18T17:31:21.738484+00:00 app[worker.1]: pid=4 tid=gq4np076o INFO: Booting Sidekiq 6.0.0 with redis options {:url=>"redis://redistogo:REDACTED#porgy.redistogo.com:11228/", :id=>"Sidekiq-server-PID-4"}
2019-09-18T17:31:21.766614+00:00 app[worker.1]: pid=4 tid=gq4np076o INFO: Cron Jobs - add job with name: flickr_photos
2019-09-18T17:31:23.288563+00:00 app[worker.1]: pid=4 tid=gq4np076o INFO: Running in ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
2019-09-18T17:31:23.288599+00:00 app[worker.1]: pid=4 tid=gq4np076o INFO: See LICENSE and the LGPL-3.0 for licensing details.
2019-09-18T17:31:23.288602+00:00 app[worker.1]: pid=4 tid=gq4np076o INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org
2019-09-18T17:31:23.289887+00:00 app[worker.1]: You are using Redis v3.2.12, Sidekiq requires Redis v4.0.0 or greater
2019-09-18T17:31:23.289931+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.0/lib/sidekiq/cli.rb:59:in `run'
2019-09-18T17:31:23.289932+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.0/bin/sidekiq:12:in `<top (required)>'
2019-09-18T17:31:23.289933+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/bin/sidekiq:23:in `load'
2019-09-18T17:31:23.289934+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/bin/sidekiq:23:in `<top (required)>'
2019-09-18T17:31:23.289935+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `load'
2019-09-18T17:31:23.289936+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
2019-09-18T17:31:23.289937+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:28:in `run'
2019-09-18T17:31:23.289938+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:465:in `exec'
2019-09-18T17:31:23.289939+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
2019-09-18T17:31:23.28994+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
2019-09-18T17:31:23.289941+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
2019-09-18T17:31:23.289943+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:27:in `dispatch'
2019-09-18T17:31:23.289943+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
2019-09-18T17:31:23.289944+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:18:in `start'
2019-09-18T17:31:23.289945+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/exe/bundle:30:in `block in <top (required)>'
2019-09-18T17:31:23.289946+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
2019-09-18T17:31:23.289947+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/exe/bundle:22:in `<top (required)>'
2019-09-18T17:31:23.289948+00:00 app[worker.1]: /app/bin/bundle:3:in `load'
2019-09-18T17:31:23.289949+00:00 app[worker.1]: /app/bin/bundle:3:in `<main>'
2019-09-18T17:31:23.357667+00:00 heroku[worker.1]: Process exited with status 1
2019-09-18T17:31:23.411452+00:00 heroku[worker.1]: State changed from up to crashed
John is correct, Sidekiq 6 requires at least Redis 4, but Redis To Go has not updated from version 3.
Instead of downgrading to meet the requirements of Redis To Go i would recommended moving dependencies.
Since you are using Heroku, two popular alternatives are Heroku Redis and Redis Cloud.
Since Redis 4 was released 2.5 years ago and Redis 5 is already released, its safe to say that Redis To Go is falling behind and you should strongly consider moving to a dependency that gets updated more frequently.
Neglecting to do so will be more difficult in the long run.
Seems to be a versioning issue:
Sidekiq 6 requires Redis 4, but RedisToGo as provided by Heroku is still using Redis 3.x
I stepped around the problem by specifying in my Gemfile:
gem 'sidekiq', '5.2.7'
You have your redis URL hardcoded in config/initializers/sidekiq.rb
Instead of:
config.redis = { url: 'redis://localhost:6379/0' }
use
config.redis = { url: ENV['REDIS_URL'] }
and ensure REDIS_URL set correctly on heroku (maybe set it manually or maybe the add-on or heroku takes care of it, I don't remember).
Please help. I trying to deploy but I keep getting this error:
Ruby 2.5.1,
Rails 5.2.1
NoMethodError (undefined methodtake' for nil:NilClass)`
Here is what I get after running heroku logs --tail
2018-10-11T13:03:05.246461+00:00 app[api]: Deploy 963768cb by user davistyrant#gmail.com
2018-10-11T13:03:08.000000+00:00 app[api]: Build succeeded
2018-10-11T13:03:26.035893+00:00 heroku[web.1]: State changed from starting to up
2018-10-11T13:06:13.341881+00:00 heroku[router]: at=info method=GET path="/" host=tellmetele.herokuapp.com request_id=b5d4a234-a19c-4bee-82b3-f62d476e2e4f fwd="107.208.176.45" dyno=web.1 connect=0ms service=135ms status=500 bytes=1827 protocol=https
2018-10-11T13:06:13.489601+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tellmetele.herokuapp.com request_id=1b04c8c6-4f86-4218-897c-bf207d88429e fwd="107.208.176.45" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2018-10-11T13:06:13.216901+00:00 app[web.1]: => Booting Puma
2018-10-11T13:06:13.216915+00:00 app[web.1]: => Rails 5.2.1 application starting in production
2018-10-11T13:06:13.216916+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-10-11T13:06:13.216919+00:00 app[web.1]: Puma starting in single mode...
2018-10-11T13:06:13.216921+00:00 app[web.1]: * Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas
2018-10-11T13:06:13.216923+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-10-11T13:06:13.216925+00:00 app[web.1]: * Environment: production
2018-10-11T13:06:13.216926+00:00 app[web.1]: * Listening on tcp://0.0.0.0:50580
2018-10-11T13:06:13.216928+00:00 app[web.1]: Use Ctrl-C to stop
2018-10-11T13:06:13.216942+00:00 app[web.1]: I, [2018-10-11T13:06:13.216751 #4] INFO -- : [b5d4a234-a19c-4bee-82b3-f62d476e2e4f] Started GET "/" for 107.208.176.45 at 2018-10-11 13:06:13 +0000
2018-10-11T13:06:13.233800+00:00 app[web.1]: I, [2018-10-11T13:06:13.233383 #4] INFO -- : [b5d4a234-a19c-4bee-82b3-f62d476e2e4f] Processing by WelcomeController#index as HTML
2018-10-11T13:06:13.330720+00:00 app[web.1]: I, [2018-10-11T13:06:13.330083 #4] INFO -- : [b5d4a234-a19c-4bee-82b3-f62d476e2e4f] Completed 500 Internal Server Error in 96ms
2018-10-11T13:06:13.333178+00:00 app[web.1]: F, [2018-10-11T13:06:13.332386 #4] FATAL -- : [b5d4a234-a19c-4bee-82b3-f62d476e2e4f]
2018-10-11T13:06:13.333310+00:00 app[web.1]: F, [2018-10-11T13:06:13.333238 #4] FATAL -- : [b5d4a234-a19c-4bee-82b3-f62d476e2e4f] NoMethodError (undefined method `take' for nil:NilClass):
2018-10-11T13:06:13.333653+00:00 app[web.1]: F, [2018-10-11T13:06:13.333577 #4] FATAL -- : [b5d4a234-a19c-4bee-82b3-f62d476e2e4f] app/controllers/welcome_controller.rb:4:in `index'
2018-10-11T13:06:13.333411+00:00 app[web.1]: F, [2018-10-11T13:06:13.333339 #4] FATAL -- : [b5d4a234-a19c-4bee-82b3-f62d476e2e4f]
2018-10-11T13:09:19.127834+00:00 app[api]: Starting process with command `rails console` by user davistyrant#gmail.com
2018-10-11T13:09:24.050501+00:00 heroku[run.4443]: Awaiting client
2018-10-11T13:09:24.081061+00:00 heroku[run.4443]: Starting process with command `rails console`
2018-10-11T13:09:24.280826+00:00 heroku[run.4443]: State changed from starting to up
2018-10-11T13:10:55.522089+00:00 heroku[run.4443]: State changed from up to complete
2018-10-11T13:10:55.483371+00:00 heroku[run.4443]: Process exited with status 0
2018-10-11T13:11:13.864425+00:00 heroku[web.1]: Restarting
2018-10-11T13:11:13.865182+00:00 heroku[web.1]: State changed from up to starting
2018-10-11T13:11:15.168348+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2018-10-11T13:11:15.185010+00:00 app[web.1]: === puma shutdown: 2018-10-11 13:11:15 +0000 ===
2018-10-11T13:11:15.185017+00:00 app[web.1]: - Goodbye!
2018-10-11T13:11:15.185137+00:00 app[web.1]: Exiting
2018-10-11T13:11:15.149622+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-10-11T13:11:15.294776+00:00 heroku[web.1]: Process exited with status 143
2018-10-11T13:11:19.511046+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 56912 -e production`
2018-10-11T13:11:32.632444+00:00 heroku[web.1]: State changed from starting to up
2018-10-11T13:12:03.512111+00:00 heroku[router]: at=info method=GET path="/" host=tellmetele.herokuapp.com request_id=236d4168-88a6-4bcc-95fb-612cedba6999 fwd="107.208.176.45" dyno=web.1 connect=1ms service=138ms status=500 bytes=1827 protocol=https
2018-10-11T13:12:03.377824+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-10-11T13:12:03.377826+00:00 app[web.1]: Puma starting in single mode...
2018-10-11T13:12:03.377827+00:00 app[web.1]: * Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas
2018-10-11T13:12:03.377805+00:00 app[web.1]: => Booting Puma
2018-10-11T13:12:03.377822+00:00 app[web.1]: => Rails 5.2.1 application starting in production
2018-10-11T13:12:03.377832+00:00 app[web.1]: * Listening on tcp://0.0.0.0:56912
2018-10-11T13:12:03.377834+00:00 app[web.1]: Use Ctrl-C to stop
2018-10-11T13:12:03.377829+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-10-11T13:12:03.509402+00:00 app[web.1]: F, [2018-10-11T13:12:03.509288 #4] FATAL -- : [236d4168-88a6-4bcc-95fb-612cedba6999]
2018-10-11T13:12:03.509674+00:00 app[web.1]: F, [2018-10-11T13:12:03.509603 #4] FATAL -- : [236d4168-88a6-4bcc-95fb-612cedba6999]
2018-10-11T13:12:03.509574+00:00 app[web.1]: F, [2018-10-11T13:12:03.509450 #4] FATAL -- : [236d4168-88a6-4bcc-95fb-612cedba6999] NoMethodError (undefined method `take' for nil:NilClass):
2018-10-11T13:12:03.377831+00:00 app[web.1]: * Environment: production
2018-10-11T13:12:03.395400+00:00 app[web.1]: I, [2018-10-11T13:12:03.395269 #4] INFO -- : [236d4168-88a6-4bcc-95fb-612cedba6999] Processing by WelcomeController#index as HTML
2018-10-11T13:12:03.508276+00:00 app[web.1]: I, [2018-10-11T13:12:03.508113 #4] INFO -- : [236d4168-88a6-4bcc-95fb-612cedba6999] Completed 500 Internal Server Error in 112ms
2018-10-11T13:12:03.377845+00:00 app[web.1]: I, [2018-10-11T13:12:03.377672 #4] INFO -- : [236d4168-88a6-4bcc-95fb-612cedba6999] Started GET "/" for 107.208.176.45 at 2018-10-11 13:12:03 +0000
2018-10-11T13:12:03.509854+00:00 app[web.1]: F, [2018-10-11T13:12:03.509752 #4] FATAL -- : [236d4168-88a6-4bcc-95fb-612cedba6999] app/controllers/welcome_controller.rb:4:in `index'
2018-10-11T13:12:03.941190+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tellmetele.herokuapp.com request_id=6e8c624c-0141-4da4-9dbc-426ca3099276 fwd="107.208.176.45" dyno=web.1 connect=1ms service=4ms status=200 bytes=143 protocol=https
2018-10-11T13:15:25.880221+00:00 heroku[web.1]: Restarting
2018-10-11T13:15:25.880730+00:00 heroku[web.1]: State changed from up to starting
2018-10-11T13:15:26.736019+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-10-11T13:15:26.814218+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2018-10-11T13:15:26.834175+00:00 app[web.1]: === puma shutdown: 2018-10-11 13:15:26 +0000 ===
2018-10-11T13:15:26.834492+00:00 app[web.1]: Exiting
2018-10-11T13:15:26.834261+00:00 app[web.1]: - Goodbye!
2018-10-11T13:15:27.169490+00:00 heroku[web.1]: Process exited with status 143
2018-10-11T13:15:29.605096+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 29987 -e production`
2018-10-11T13:15:35.374170+00:00 heroku[web.1]: State changed from starting to up
2018-10-11T13:16:47.479481+00:00 heroku[router]: at=info method=GET path="/" host=tellmetele.herokuapp.com request_id=ca9b9cf4-45bb-4139-8397-748a53ff1ecd fwd="107.208.176.45" dyno=web.1 connect=0ms service=60ms status=500 bytes=1827 protocol=https
2018-10-11T13:16:47.423357+00:00 app[web.1]: => Booting Puma
2018-10-11T13:16:47.423392+00:00 app[web.1]: => Rails 5.2.1 application starting in production
2018-10-11T13:16:47.423394+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-10-11T13:16:47.423399+00:00 app[web.1]: Puma starting in single mode...
2018-10-11T13:16:47.423401+00:00 app[web.1]: * Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas
2018-10-11T13:16:47.423407+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-10-11T13:16:47.423408+00:00 app[web.1]: * Environment: production
2018-10-11T13:16:47.423411+00:00 app[web.1]: Use Ctrl-C to stop
2018-10-11T13:16:47.423410+00:00 app[web.1]: * Listening on tcp://0.0.0.0:29987
2018-10-11T13:16:47.423419+00:00 app[web.1]: I, [2018-10-11T13:16:47.423133 #4] INFO -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd] Started GET "/" for 107.208.176.45 at 2018-10-11 13:16:47 +0000
2018-10-11T13:16:47.433037+00:00 app[web.1]: I, [2018-10-11T13:16:47.432896 #4] INFO -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd] Processing by WelcomeController#index as HTML
2018-10-11T13:16:47.477319+00:00 app[web.1]: I, [2018-10-11T13:16:47.477177 #4] INFO -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd] Completed 500 Internal Server Error in 39ms
2018-10-11T13:16:47.478108+00:00 app[web.1]: F, [2018-10-11T13:16:47.478014 #4] FATAL -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd]
2018-10-11T13:16:47.478185+00:00 app[web.1]: F, [2018-10-11T13:16:47.478103 #4] FATAL -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd] NoMethodError (undefined method `take' for nil:NilClass):
2018-10-11T13:16:47.478322+00:00 app[web.1]: F, [2018-10-11T13:16:47.478183 #4] FATAL -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd]
2018-10-11T13:16:47.478406+00:00 app[web.1]: F, [2018-10-11T13:16:47.478327 #4] FATAL -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd] app/controllers/welcome_controller.rb:4:in `index'
2018-10-11T13:16:47.911583+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tellmetele.herokuapp.com request_id=d45521a1-be85-47f5-a36c-ffffcddbfe5a fwd="107.208.176.45" dyno=web.1 connect=0ms service=1ms status=304 bytes=48 protocol=https
2018-10-11T13:31:53.937375+00:00 app[web.1]: I, [2018-10-11T13:31:53.937211 #4] INFO -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b] Started GET "/" for 107.208.176.45 at 2018-10-11 13:31:53 +0000
2018-10-11T13:31:53.938482+00:00 app[web.1]: I, [2018-10-11T13:31:53.938396 #4] INFO -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b] Processing by WelcomeController#index as HTML
2018-10-11T13:31:53.965078+00:00 app[web.1]: I, [2018-10-11T13:31:53.964899 #4] INFO -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b] Completed 500 Internal Server Error in 26ms
2018-10-11T13:31:53.966246+00:00 app[web.1]: F, [2018-10-11T13:31:53.966126 #4] FATAL -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b]
2018-10-11T13:31:53.966365+00:00 app[web.1]: F, [2018-10-11T13:31:53.966277 #4] FATAL -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b] NoMethodError (undefined method `take' for nil:NilClass):
2018-10-11T13:31:53.966447+00:00 app[web.1]: F, [2018-10-11T13:31:53.966367 #4] FATAL -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b]
2018-10-11T13:31:53.966553+00:00 app[web.1]: F, [2018-10-11T13:31:53.966462 #4] FATAL -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b] app/controllers/welcome_controller.rb:4:in `index'
2018-10-11T13:31:54.111275+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tellmetele.herokuapp.com request_id=ca2791a5-20a1-4232-9d7d-e22b54f5cef0 fwd="107.208.176.45" dyno=web.1 connect=1ms service=2ms status=200 bytes=143 protocol=https
2018-10-11T13:31:53.967004+00:00 heroku[router]: at=info method=GET path="/" host=tellmetele.herokuapp.com request_id=bb6be014-e6b9-46da-88d4-1b3bec87236b fwd="107.208.176.45" dyno=web.1 connect=1ms service=33ms status=500 bytes=1827 protocol=https
2018-10-11T14:08:06.626516+00:00 heroku[web.1]: Idling
2018-10-11T14:08:06.627170+00:00 heroku[web.1]: State changed from up to down
2018-10-11T14:08:07.504722+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-10-11T14:08:07.522614+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2018-10-11T14:08:07.540228+00:00 app[web.1]: === puma shutdown: 2018-10-11 14:08:07 +0000 ===
2018-10-11T14:08:07.540234+00:00 app[web.1]: - Goodbye!
2018-10-11T14:08:07.541182+00:00 app[web.1]: Exiting
2018-10-11T14:08:07.697959+00:00 heroku[web.1]: Process exited with status 143
^C
*[test-bundler][~/Documents/certification-project/tellmetele]$ heroku restart rvm:ruby-2.5.1
Restarting dynos on ⬢ tellmetele... done
*[test-bundler][~/Documents/certification-project/tellmetele]$ heroku apps:info rvm:ruby-2.5.1
=== tellmetele
Addons: heroku-postgresql:hobby-dev
Auto Cert Mgmt: false
Dynos: web: 1
Git URL: https://git.heroku.com/tellmetele.git
Owner: davistyrant#gmail.com
Region: us
Repo Size: 113 KB
Slug Size: 49 MB
Stack: heroku-18
Web URL: https://tellmetele.herokuapp.com/
*[test-bundler][~/Documents/certification-project/tellmetele]$ heroku logs --tail rvm:ruby-2.5.1
2018-10-11T13:09:19.127834+00:00 app[api]: Starting process with command `rails console` by user davistyrant#gmail.com
2018-10-11T13:09:24.050501+00:00 heroku[run.4443]: Awaiting client
2018-10-11T13:09:24.081061+00:00 heroku[run.4443]: Starting process with command `rails console`
2018-10-11T13:09:24.280826+00:00 heroku[run.4443]: State changed from starting to up
2018-10-11T13:10:55.522089+00:00 heroku[run.4443]: State changed from up to complete
2018-10-11T13:10:55.483371+00:00 heroku[run.4443]: Process exited with status 0
2018-10-11T13:11:13.864425+00:00 heroku[web.1]: Restarting
2018-10-11T13:11:13.865182+00:00 heroku[web.1]: State changed from up to starting
2018-10-11T13:11:15.168348+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2018-10-11T13:11:15.185010+00:00 app[web.1]: === puma shutdown: 2018-10-11 13:11:15 +0000 ===
2018-10-11T13:11:15.185017+00:00 app[web.1]: - Goodbye!
2018-10-11T13:11:15.185137+00:00 app[web.1]: Exiting
2018-10-11T13:11:15.149622+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-10-11T13:11:15.294776+00:00 heroku[web.1]: Process exited with status 143
2018-10-11T13:11:19.511046+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 56912 -e production`
2018-10-11T13:11:32.632444+00:00 heroku[web.1]: State changed from starting to up
2018-10-11T13:12:03.512111+00:00 heroku[router]: at=info method=GET path="/" host=tellmetele.herokuapp.com request_id=236d4168-88a6-4bcc-95fb-612cedba6999 fwd="107.208.176.45" dyno=web.1 connect=1ms service=138ms status=500 bytes=1827 protocol=https
2018-10-11T13:12:03.377824+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-10-11T13:12:03.377826+00:00 app[web.1]: Puma starting in single mode...
2018-10-11T13:12:03.377827+00:00 app[web.1]: * Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas
2018-10-11T13:12:03.377805+00:00 app[web.1]: => Booting Puma
2018-10-11T13:12:03.377822+00:00 app[web.1]: => Rails 5.2.1 application starting in production
2018-10-11T13:12:03.377832+00:00 app[web.1]: * Listening on tcp://0.0.0.0:56912
2018-10-11T13:12:03.377834+00:00 app[web.1]: Use Ctrl-C to stop
2018-10-11T13:12:03.377829+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-10-11T13:12:03.509402+00:00 app[web.1]: F, [2018-10-11T13:12:03.509288 #4] FATAL -- : [236d4168-88a6-4bcc-95fb-612cedba6999]
2018-10-11T13:12:03.509674+00:00 app[web.1]: F, [2018-10-11T13:12:03.509603 #4] FATAL -- : [236d4168-88a6-4bcc-95fb-612cedba6999]
2018-10-11T13:12:03.509574+00:00 app[web.1]: F, [2018-10-11T13:12:03.509450 #4] FATAL -- : [236d4168-88a6-4bcc-95fb-612cedba6999] NoMethodError (undefined method `take' for nil:NilClass):
2018-10-11T13:12:03.377831+00:00 app[web.1]: * Environment: production
2018-10-11T13:12:03.395400+00:00 app[web.1]: I, [2018-10-11T13:12:03.395269 #4] INFO -- : [236d4168-88a6-4bcc-95fb-612cedba6999] Processing by WelcomeController#index as HTML
2018-10-11T13:12:03.508276+00:00 app[web.1]: I, [2018-10-11T13:12:03.508113 #4] INFO -- : [236d4168-88a6-4bcc-95fb-612cedba6999] Completed 500 Internal Server Error in 112ms
2018-10-11T13:12:03.377845+00:00 app[web.1]: I, [2018-10-11T13:12:03.377672 #4] INFO -- : [236d4168-88a6-4bcc-95fb-612cedba6999] Started GET "/" for 107.208.176.45 at 2018-10-11 13:12:03 +0000
2018-10-11T13:12:03.509854+00:00 app[web.1]: F, [2018-10-11T13:12:03.509752 #4] FATAL -- : [236d4168-88a6-4bcc-95fb-612cedba6999] app/controllers/welcome_controller.rb:4:in `index'
2018-10-11T13:12:03.941190+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tellmetele.herokuapp.com request_id=6e8c624c-0141-4da4-9dbc-426ca3099276 fwd="107.208.176.45" dyno=web.1 connect=1ms service=4ms status=200 bytes=143 protocol=https
2018-10-11T13:15:25.880221+00:00 heroku[web.1]: Restarting
2018-10-11T13:15:25.880730+00:00 heroku[web.1]: State changed from up to starting
2018-10-11T13:15:26.736019+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-10-11T13:15:26.814218+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2018-10-11T13:15:26.834175+00:00 app[web.1]: === puma shutdown: 2018-10-11 13:15:26 +0000 ===
2018-10-11T13:15:26.834492+00:00 app[web.1]: Exiting
2018-10-11T13:15:26.834261+00:00 app[web.1]: - Goodbye!
2018-10-11T13:15:27.169490+00:00 heroku[web.1]: Process exited with status 143
2018-10-11T13:15:29.605096+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 29987 -e production`
2018-10-11T13:15:35.374170+00:00 heroku[web.1]: State changed from starting to up
2018-10-11T13:16:47.479481+00:00 heroku[router]: at=info method=GET path="/" host=tellmetele.herokuapp.com request_id=ca9b9cf4-45bb-4139-8397-748a53ff1ecd fwd="107.208.176.45" dyno=web.1 connect=0ms service=60ms status=500 bytes=1827 protocol=https
2018-10-11T13:16:47.423357+00:00 app[web.1]: => Booting Puma
2018-10-11T13:16:47.423392+00:00 app[web.1]: => Rails 5.2.1 application starting in production
2018-10-11T13:16:47.423394+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-10-11T13:16:47.423399+00:00 app[web.1]: Puma starting in single mode...
2018-10-11T13:16:47.423401+00:00 app[web.1]: * Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas
2018-10-11T13:16:47.423407+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-10-11T13:16:47.423408+00:00 app[web.1]: * Environment: production
2018-10-11T13:16:47.423411+00:00 app[web.1]: Use Ctrl-C to stop
2018-10-11T13:16:47.423410+00:00 app[web.1]: * Listening on tcp://0.0.0.0:29987
2018-10-11T13:16:47.423419+00:00 app[web.1]: I, [2018-10-11T13:16:47.423133 #4] INFO -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd] Started GET "/" for 107.208.176.45 at 2018-10-11 13:16:47 +0000
2018-10-11T13:16:47.433037+00:00 app[web.1]: I, [2018-10-11T13:16:47.432896 #4] INFO -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd] Processing by WelcomeController#index as HTML
2018-10-11T13:16:47.477319+00:00 app[web.1]: I, [2018-10-11T13:16:47.477177 #4] INFO -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd] Completed 500 Internal Server Error in 39ms
2018-10-11T13:16:47.478108+00:00 app[web.1]: F, [2018-10-11T13:16:47.478014 #4] FATAL -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd]
2018-10-11T13:16:47.478185+00:00 app[web.1]: F, [2018-10-11T13:16:47.478103 #4] FATAL -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd] NoMethodError (undefined method `take' for nil:NilClass):
2018-10-11T13:16:47.478322+00:00 app[web.1]: F, [2018-10-11T13:16:47.478183 #4] FATAL -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd]
2018-10-11T13:16:47.478406+00:00 app[web.1]: F, [2018-10-11T13:16:47.478327 #4] FATAL -- : [ca9b9cf4-45bb-4139-8397-748a53ff1ecd] app/controllers/welcome_controller.rb:4:in `index'
2018-10-11T13:16:47.911583+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tellmetele.herokuapp.com request_id=d45521a1-be85-47f5-a36c-ffffcddbfe5a fwd="107.208.176.45" dyno=web.1 connect=0ms service=1ms status=304 bytes=48 protocol=https
2018-10-11T13:31:53.937375+00:00 app[web.1]: I, [2018-10-11T13:31:53.937211 #4] INFO -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b] Started GET "/" for 107.208.176.45 at 2018-10-11 13:31:53 +0000
2018-10-11T13:31:53.938482+00:00 app[web.1]: I, [2018-10-11T13:31:53.938396 #4] INFO -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b] Processing by WelcomeController#index as HTML
2018-10-11T13:31:53.965078+00:00 app[web.1]: I, [2018-10-11T13:31:53.964899 #4] INFO -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b] Completed 500 Internal Server Error in 26ms
2018-10-11T13:31:53.966246+00:00 app[web.1]: F, [2018-10-11T13:31:53.966126 #4] FATAL -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b]
2018-10-11T13:31:53.966365+00:00 app[web.1]: F, [2018-10-11T13:31:53.966277 #4] FATAL -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b] NoMethodError (undefined method `take' for nil:NilClass):
2018-10-11T13:31:53.966447+00:00 app[web.1]: F, [2018-10-11T13:31:53.966367 #4] FATAL -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b]
2018-10-11T13:31:53.966553+00:00 app[web.1]: F, [2018-10-11T13:31:53.966462 #4] FATAL -- : [bb6be014-e6b9-46da-88d4-1b3bec87236b] app/controllers/welcome_controller.rb:4:in `index'
2018-10-11T13:31:54.111275+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tellmetele.herokuapp.com request_id=ca2791a5-20a1-4232-9d7d-e22b54f5cef0 fwd="107.208.176.45" dyno=web.1 connect=1ms service=2ms status=200 bytes=143 protocol=https
2018-10-11T13:31:53.967004+00:00 heroku[router]: at=info method=GET path="/" host=tellmetele.herokuapp.com request_id=bb6be014-e6b9-46da-88d4-1b3bec87236b fwd="107.208.176.45" dyno=web.1 connect=1ms service=33ms status=500 bytes=1827 protocol=https
2018-10-11T14:08:06.626516+00:00 heroku[web.1]: Idling
2018-10-11T14:08:06.627170+00:00 heroku[web.1]: State changed from up to down
2018-10-11T14:08:07.504722+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-10-11T14:08:07.522614+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2018-10-11T14:08:07.540228+00:00 app[web.1]: === puma shutdown: 2018-10-11 14:08:07 +0000 ===
2018-10-11T14:08:07.540234+00:00 app[web.1]: - Goodbye!
2018-10-11T14:08:07.541182+00:00 app[web.1]: Exiting
2018-10-11T14:08:07.697959+00:00 heroku[web.1]: Process exited with status 143
2018-10-11T14:47:20.384445+00:00 heroku[web.1]: State changed from down to starting
2018-10-11T14:47:25.692081+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 27996 -e production`
2018-10-11T14:47:38.701112+00:00 heroku[web.1]: State changed from starting to up
2018-10-11T14:48:50.067467+00:00 heroku[router]: at=info method=GET path="/" host=tellmetele.herokuapp.com request_id=1dc30c3e-bf46-4fdd-9e60-6ada594823af fwd="107.208.176.45" dyno=web.1 connect=0ms service=55ms status=500 bytes=1827 protocol=https
2018-10-11T14:48:50.014148+00:00 app[web.1]: => Rails 5.2.1 application starting in production
2018-10-11T14:48:50.014150+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-10-11T14:48:50.014152+00:00 app[web.1]: Puma starting in single mode...
2018-10-11T14:48:50.014153+00:00 app[web.1]: * Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas
2018-10-11T14:48:50.014155+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-10-11T14:48:50.014157+00:00 app[web.1]: * Environment: production
2018-10-11T14:48:50.014122+00:00 app[web.1]: => Booting Puma
2018-10-11T14:48:50.014158+00:00 app[web.1]: * Listening on tcp://0.0.0.0:27996
2018-10-11T14:48:50.014160+00:00 app[web.1]: Use Ctrl-C to stop
2018-10-11T14:48:50.014172+00:00 app[web.1]: I, [2018-10-11T14:48:50.013977 #4] INFO -- : [1dc30c3e-bf46-4fdd-9e60-6ada594823af] Started GET "/" for 107.208.176.45 at 2018-10-11 14:48:50 +0000
2018-10-11T14:48:50.019052+00:00 app[web.1]: I, [2018-10-11T14:48:50.018956 #4] INFO -- : [1dc30c3e-bf46-4fdd-9e60-6ada594823af] Processing by WelcomeController#index as HTML
2018-10-11T14:48:50.061273+00:00 app[web.1]: I, [2018-10-11T14:48:50.061050 #4] INFO -- : [1dc30c3e-bf46-4fdd-9e60-6ada594823af] Completed 500 Internal Server Error in 41ms
2018-10-11T14:48:50.064466+00:00 app[web.1]: F, [2018-10-11T14:48:50.064359 #4] FATAL -- : [1dc30c3e-bf46-4fdd-9e60-6ada594823af]
2018-10-11T14:48:50.064594+00:00 app[web.1]: F, [2018-10-11T14:48:50.064521 #4] FATAL -- : [1dc30c3e-bf46-4fdd-9e60-6ada594823af] NoMethodError (undefined method `take' for nil:NilClass):
2018-10-11T14:48:50.064702+00:00 app[web.1]: F, [2018-10-11T14:48:50.064621 #4] FATAL -- : [1dc30c3e-bf46-4fdd-9e60-6ada594823af]
2018-10-11T14:48:50.064805+00:00 app[web.1]: F, [2018-10-11T14:48:50.064740 #4] FATAL -- : [1dc30c3e-bf46-4fdd-9e60-6ada594823af] app/controllers/welcome_controller.rb:4:in `index'
2018-10-11T14:48:50.593266+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tellmetele.herokuapp.com request_id=05f75b86-c9f9-4328-a4a2-883ae82898f4 fwd="107.208.176.45" dyno=web.1 connect=1ms service=6ms status=200 bytes=143 protocol=https
It appears to be . an issue with the welcome controller. Here is the controller
class WelcomeController < ApplicationController
def index
parsed_response = Tv.get_popular_shows
popular_shows = parsed_response['results'].take(8)
pages = parsed_response['total_pages']
render :index, locals: {
parsed_response: parsed_response,
popular_shows: popular_shows,
pages: pages
}
end
end
Here is the welcome index view file
<h1 class="w3-center">TVs' Most Popular</h1>
<section class="w3-content">
<% popular_shows.each do |show| %>
<%= link_to image_tag("https://image.tmdb.org/t/p/w200/#{show['poster_path']}", :alt => "#{show['original_name']} image.", class: "poster w3-image w3-padding w3-card"), root_url + 'tvs/show?' + {tvid: show['id']}.to_param, method: :get %>
<% end %>
</section>
Here is how get_popular_shows is defined:
class Tv < ApplicationRecord
include HTTParty
base_uri 'https://api.themoviedb.org/3'
default_params api_key: ENV['API_KEY']
format :json
def Tv.get_all_shows(page, sort)
get("/discover/tv", query: {sort_by: sort, page: page})
end
def Tv.get_popular_shows
get("/discover/tv", query: {sort_by: "popularity.desc"})
end
def Tv.get_single_show(tv_id)
get("/tv/#{tv_id}",query: {})
end
end
This does not make sense. The app works locally and launched on Heroku. I read and tried so many solutions to no avail. I do not know where to go from here. Any help will be much appreciated. Thanks in advance.
I was trying to test sending an e-mail from a contact form of a Rails app based at an Heroku server and I got an error saying:
We're sorry, but something went wrong. If you are the application owner check the logs for more information.
My intention was to learn how to integrate a mail server service into my Heroku account. For that, the addon used was MailGun. I even created a MailGun account with my personal e-mail to be able to check if I'm getting the e-mails or not.
After deploying the code from the Cloud9 environment to Heroku servers with the success, the only change I made in my Ruby code was the following stuff:
config/environment.rb
ActionMailer::Base.smtp_settings = {
:port => ENV['MAILGUN_SMTP_PORT'],
:address => ENV['MAILGUN_SMTP_SERVER'],
:user_name => ENV['MAILGUN_SMTP_LOGIN'],
:password => ENV['MAILGUN_SMTP_PASSWORD'],
:domain => 'blahblahblah.herokuapp.com',
:authentication => :plain,
}
ActionMailer::Base.delivery_method = :smtp
What's the problem? Any tip for a solution?
Updated Requested Info (Heroku Logs - I can't update all the logs due to restriction of characters in StackOverflow body):
iamsamuel:~/workspace/saasapp (master) $ heroku logs
2017-02-24T20:18:19.316716+00:00 app[web.1]: Content-Type: text/html;
2017-02-24T20:18:19.316717+00:00 app[web.1]: charset=UTF-8
2017-02-24T20:18:19.316718+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2017-02-24T20:18:19.316718+00:00 app[web.1]:
2017-02-24T20:18:19.316719+00:00 app[web.1]: <!DOCTYPE html>
2017-02-24T20:18:19.316719+00:00 app[web.1]: <html>
2017-02-24T20:18:19.316720+00:00 app[web.1]: <head>
2017-02-24T20:18:19.316721+00:00 app[web.1]: </head>
2017-02-24T20:18:19.316721+00:00 app[web.1]: <body>
2017-02-24T20:18:19.316722+00:00 app[web.1]: <p>
2017-02-24T20:18:19.316723+00:00 app[web.1]: You have received a message from the site's contact form, from Sam, smlmrr#outlook.com.
2017-02-24T20:18:19.316724+00:00 app[web.1]: </p>
2017-02-24T20:18:19.316724+00:00 app[web.1]: <p>
2017-02-24T20:18:19.316725+00:00 app[web.1]:
2017-02-24T20:18:19.316725+00:00 app[web.1]: </p>
2017-02-24T20:18:19.316726+00:00 app[web.1]: </body>
2017-02-24T20:18:19.316726+00:00 app[web.1]: </html>
2017-02-24T20:18:19.316886+00:00 app[web.1]: I, [2017-02-24T20:18:19.316838 #4] INFO -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Completed 500 Internal Server Error in 1166ms (ActiveRecord: 4.1ms)
2017-02-24T20:18:19.317316+00:00 app[web.1]: F, [2017-02-24T20:18:19.317273 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]
2017-02-24T20:18:19.317357+00:00 app[web.1]: F, [2017-02-24T20:18:19.317318 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:18:19.317358+00:00 app[web.1]: ):
2017-02-24T20:18:19.317396+00:00 app[web.1]: F, [2017-02-24T20:18:19.317355 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]
2017-02-24T20:18:19.317435+00:00 app[web.1]: F, [2017-02-24T20:18:19.317396 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] app/controllers/contacts_controller.rb:15:in `create'
2017-02-24T20:18:19.520898+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=62153ff0-bef7-4e44-958b-447fb18e7c23 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:53:16.169251+00:00 heroku[web.1]: Idling
2017-02-24T20:53:16.169901+00:00 heroku[web.1]: State changed from up to down
2017-02-24T20:53:17.034264+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-02-24T20:53:17.078764+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-02-24T20:53:17.078952+00:00 app[web.1]: === puma shutdown: 2017-02-24 20:53:17 +0000 ===
2017-02-24T20:53:17.078957+00:00 app[web.1]: - Goodbye!
2017-02-24T20:53:17.079100+00:00 app[web.1]: Exiting
2017-02-24T20:53:17.347515+00:00 heroku[web.1]: Process exited with status 0
2017-02-24T20:57:24.680979+00:00 heroku[web.1]: Unidling
2017-02-24T20:57:24.681258+00:00 heroku[web.1]: State changed from down to starting
2017-02-24T20:57:27.221989+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 44473 -e production`
2017-02-24T20:57:30.299354+00:00 app[web.1]: => Booting Puma
2017-02-24T20:57:30.299447+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:44473
2017-02-24T20:57:30.299502+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-02-24T20:57:31.229688+00:00 app[web.1]: Puma starting in single mode...
2017-02-24T20:57:31.229714+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-02-24T20:57:31.229713+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-02-24T20:57:31.229716+00:00 app[web.1]: * Environment: production
2017-02-24T20:57:31.229813+00:00 app[web.1]: * Listening on tcp://0.0.0.0:44473
2017-02-24T20:57:31.230029+00:00 app[web.1]: Use Ctrl-C to stop
2017-02-24T20:57:31.421917+00:00 heroku[web.1]: State changed from starting to up
2017-02-24T20:57:32.788592+00:00 heroku[router]: at=info method=GET path="/" host=infinite-forest-28304.herokuapp.com request_id=dedd394a-498a-464d-a669-ed19fa2fd418 fwd="188.83.235.112" dyno=web.1 connect=0ms service=58ms status=200 bytes=2753
2017-02-24T20:57:32.737531+00:00 app[web.1]: I, [2017-02-24T20:57:32.737424 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Started GET "/" for 188.83.235.112 at 2017-02-24 20:57:32 +0000
2017-02-24T20:57:32.740219+00:00 app[web.1]: I, [2017-02-24T20:57:32.740152 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Processing by PagesController#home as HTML
2017-02-24T20:57:32.752357+00:00 app[web.1]: I, [2017-02-24T20:57:32.752273 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Rendering pages/home.html.erb within layouts/application
2017-02-24T20:57:32.753153+00:00 app[web.1]: I, [2017-02-24T20:57:32.753082 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Rendered pages/home.html.erb within layouts/application (0.6ms)
2017-02-24T20:57:32.759595+00:00 app[web.1]: I, [2017-02-24T20:57:32.759524 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Completed 200 OK in 19ms (Views: 8.6ms | ActiveRecord: 0.0ms)
2017-02-24T20:57:32.929609+00:00 heroku[router]: at=info method=GET path="/assets/application-95163fa38446d1bb6139f870d5fb932af7fa47b347b8951923c32a4565386aa6.js" host=infinite-forest-28304.herokuapp.com request_id=80d55a95-cbe8-4982-a571-bc8850567a87 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:32.928158+00:00 heroku[router]: at=info method=GET path="/assets/application-5ed627eba0abe94ba4e2c255c2298f55d9bca9b4ea45ded59ba1705edc5385d0.css" host=infinite-forest-28304.herokuapp.com request_id=a9c456f3-e7cd-4d6a-865f-2c8f5efbdaa7 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.143930+00:00 heroku[router]: at=info method=GET path="/assets/font-awesome/fontawesome-webfont-2932abf996373e87fbf2e950876b1962f1b57db954a1643ea68831d9fbb74da4.woff2?v=4.6.2" host=infinite-forest-28304.herokuapp.com request_id=90d78563-eaa6-4f24-a054-5c89beada59c fwd="188.83.235.112" dyno=web.1 connect=3ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.402193+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=7c20311c-bd5a-46c3-a9d5-c6266c1f9331 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:50.706814+00:00 heroku[router]: at=info method=GET path="/contact-us" host=infinite-forest-28304.herokuapp.com request_id=0ec752b1-0d75-42dd-83f6-ecd127086bfb fwd="188.83.235.112" dyno=web.1 connect=0ms service=35ms status=200 bytes=4317
2017-02-24T20:57:50.651067+00:00 app[web.1]: I, [2017-02-24T20:57:50.650984 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Started GET "/contact-us" for 188.83.235.112 at 2017-02-24 20:57:50 +0000
2017-02-24T20:57:50.652579+00:00 app[web.1]: I, [2017-02-24T20:57:50.652518 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Processing by ContactsController#new as HTML
2017-02-24T20:57:50.669618+00:00 app[web.1]: I, [2017-02-24T20:57:50.669536 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Rendering contacts/new.html.erb within layouts/application
2017-02-24T20:57:50.681558+00:00 app[web.1]: I, [2017-02-24T20:57:50.681481 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Rendered contacts/new.html.erb within layouts/application (11.8ms)
2017-02-24T20:57:50.682909+00:00 app[web.1]: I, [2017-02-24T20:57:50.682846 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Completed 200 OK in 30ms (Views: 14.0ms | ActiveRecord: 7.5ms)
2017-02-24T20:59:14.426470+00:00 app[web.1]: I, [2017-02-24T20:59:14.426395 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Started POST "/contacts" for 188.83.235.112 at 2017-02-24 20:59:14 +0000
2017-02-24T20:59:14.427281+00:00 app[web.1]: I, [2017-02-24T20:59:14.427232 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Processing by ContactsController#create as HTML
2017-02-24T20:59:14.427366+00:00 app[web.1]: I, [2017-02-24T20:59:14.427324 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Parameters: {"utf8"=>"✓", "authenticity_token"=>"MgrtXM/8aUAYPnJ2ph4eIbsqMbLR/xXMZabcKmKh4myMlp0MdLJ2dCHnh7KshXSCqAsIzGQr0SdebpJw1v0QHw==", "contact"=>{"name"=>"Jesse Pinkman", "email"=>"jp#example.com", "comments"=>"Yo Beach!"}, "commit"=>"Submit"}
2017-02-24T20:59:14.429694+00:00 app[web.1]: D, [2017-02-24T20:59:14.429641 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] (0.9ms) BEGIN
2017-02-24T20:59:14.434537+00:00 app[web.1]: D, [2017-02-24T20:59:14.434485 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] SQL (1.3ms) INSERT INTO "contacts" ("name", "email", "comments", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Jesse Pinkman"], ["email", "jp#example.com"], ["comments", "Yo Beach!"], ["created_at", 2017-02-24 20:59:14 UTC], ["updated_at", 2017-02-24 20:59:14 UTC]]
2017-02-24T20:59:14.436712+00:00 app[web.1]: D, [2017-02-24T20:59:14.436665 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] (1.9ms) COMMIT
2017-02-24T20:59:14.441776+00:00 app[web.1]: I, [2017-02-24T20:59:14.441724 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Rendering contact_mailer/contact_email.html.erb
2017-02-24T20:59:14.442284+00:00 app[web.1]: I, [2017-02-24T20:59:14.442237 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Rendered contact_mailer/contact_email.html.erb (0.4ms)
2017-02-24T20:59:14.622612+00:00 app[web.1]: D, [2017-02-24T20:59:14.622518 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] ContactMailer#contact_email: processed outbound mail in 184.5ms
2017-02-24T20:59:14.749027+00:00 heroku[router]: at=info method=POST path="/contacts" host=infinite-forest-28304.herokuapp.com request_id=606794a4-3f9b-417c-b3ca-72af4d8bafb6 fwd="188.83.235.112" dyno=web.1 connect=0ms service=304ms status=500 bytes=1669
2017-02-24T20:59:14.722589+00:00 app[web.1]: I, [2017-02-24T20:59:14.722491 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Sent mail to samuelslmoreira#hotmail.com (99.8ms)
2017-02-24T20:59:14.722632+00:00 app[web.1]: D, [2017-02-24T20:59:14.722588 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Date: Fri, 24 Feb 2017 20:59:14 +0000
2017-02-24T20:59:14.722632+00:00 app[web.1]: From: jp#example.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: To: samuelslmoreira#hotmail.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: Message-ID: <58b09ea298a14_43fc0c75eb9c0103ae#71798652-2827-4935-9282-6b3ae7c47b44.mail>
2017-02-24T20:59:14.722634+00:00 app[web.1]: Subject: Contact Form Message
2017-02-24T20:59:14.722634+00:00 app[web.1]: Mime-Version: 1.0
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Type: text/html;
2017-02-24T20:59:14.722635+00:00 app[web.1]: charset=UTF-8
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2017-02-24T20:59:14.722636+00:00 app[web.1]:
2017-02-24T20:59:14.722636+00:00 app[web.1]: <!DOCTYPE html>
2017-02-24T20:59:14.722637+00:00 app[web.1]: <html>
2017-02-24T20:59:14.722637+00:00 app[web.1]: <head>
2017-02-24T20:59:14.722637+00:00 app[web.1]: </head>
2017-02-24T20:59:14.722638+00:00 app[web.1]: <body>
2017-02-24T20:59:14.722638+00:00 app[web.1]: <p>
2017-02-24T20:59:14.722638+00:00 app[web.1]: You have received a message from the site's contact form, from Jesse Pinkman, jp#example.com.
2017-02-24T20:59:14.722639+00:00 app[web.1]: </p>
2017-02-24T20:59:14.722639+00:00 app[web.1]: <p>
2017-02-24T20:59:14.722639+00:00 app[web.1]:
2017-02-24T20:59:14.722640+00:00 app[web.1]: </p>
2017-02-24T20:59:14.722640+00:00 app[web.1]: </body>
2017-02-24T20:59:14.722640+00:00 app[web.1]: </html>
2017-02-24T20:59:14.722825+00:00 app[web.1]: I, [2017-02-24T20:59:14.722779 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Completed 500 Internal Server Error in 295ms (ActiveRecord: 4.1ms)
2017-02-24T20:59:14.723286+00:00 app[web.1]: F, [2017-02-24T20:59:14.723242 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]
2017-02-24T20:59:14.723324+00:00 app[web.1]: F, [2017-02-24T20:59:14.723287 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:59:14.723325+00:00 app[web.1]: ):
2017-02-24T20:59:14.723357+00:00 app[web.1]: F, [2017-02-24T20:59:14.723324 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]
2017-02-24T20:59:14.723390+00:00 app[web.1]: F, [2017-02-24T20:59:14.723357 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] app/controllers/contacts_controller.rb:15:in `create'
iamsamuel:~/workspace/saasapp (master) $ clear
iamsamuel:~/workspace/saasapp (master) $ clear
iamsamuel:~/workspace/saasapp (master) $ heroku logs
2017-02-24T20:18:19.316723+00:00 app[web.1]: You have received a message from the site's contact form, from Sam, smlmrr#outlook.com.
2017-02-24T20:18:19.316724+00:00 app[web.1]: </p>
2017-02-24T20:18:19.316724+00:00 app[web.1]: <p>
2017-02-24T20:18:19.316725+00:00 app[web.1]:
2017-02-24T20:18:19.316725+00:00 app[web.1]: </p>
2017-02-24T20:18:19.316726+00:00 app[web.1]: </body>
2017-02-24T20:18:19.316726+00:00 app[web.1]: </html>
2017-02-24T20:18:19.316886+00:00 app[web.1]: I, [2017-02-24T20:18:19.316838 #4] INFO -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Completed 500 Internal Server Error in 1166ms (ActiveRecord: 4.1ms)
2017-02-24T20:18:19.317316+00:00 app[web.1]: F, [2017-02-24T20:18:19.317273 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]
2017-02-24T20:18:19.317357+00:00 app[web.1]: F, [2017-02-24T20:18:19.317318 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:18:19.317358+00:00 app[web.1]: ):
2017-02-24T20:18:19.317396+00:00 app[web.1]: F, [2017-02-24T20:18:19.317355 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]
2017-02-24T20:18:19.317435+00:00 app[web.1]: F, [2017-02-24T20:18:19.317396 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] app/controllers/contacts_controller.rb:15:in `create'
2017-02-24T20:18:19.520898+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=62153ff0-bef7-4e44-958b-447fb18e7c23 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:53:16.169251+00:00 heroku[web.1]: Idling
2017-02-24T20:53:16.169901+00:00 heroku[web.1]: State changed from up to down
2017-02-24T20:53:17.034264+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-02-24T20:53:17.078764+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-02-24T20:53:17.078952+00:00 app[web.1]: === puma shutdown: 2017-02-24 20:53:17 +0000 ===
2017-02-24T20:53:17.078957+00:00 app[web.1]: - Goodbye!
2017-02-24T20:53:17.079100+00:00 app[web.1]: Exiting
2017-02-24T20:53:17.347515+00:00 heroku[web.1]: Process exited with status 0
2017-02-24T20:57:24.680979+00:00 heroku[web.1]: Unidling
2017-02-24T20:57:24.681258+00:00 heroku[web.1]: State changed from down to starting
2017-02-24T20:57:27.221989+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 44473 -e production`
2017-02-24T20:57:30.299354+00:00 app[web.1]: => Booting Puma
2017-02-24T20:57:30.299447+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:44473
2017-02-24T20:57:30.299502+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-02-24T20:57:31.229688+00:00 app[web.1]: Puma starting in single mode...
2017-02-24T20:57:31.229714+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-02-24T20:57:31.229713+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-02-24T20:57:31.229716+00:00 app[web.1]: * Environment: production
2017-02-24T20:57:31.229813+00:00 app[web.1]: * Listening on tcp://0.0.0.0:44473
2017-02-24T20:57:31.230029+00:00 app[web.1]: Use Ctrl-C to stop
2017-02-24T20:57:31.421917+00:00 heroku[web.1]: State changed from starting to up
2017-02-24T20:57:32.788592+00:00 heroku[router]: at=info method=GET path="/" host=infinite-forest-28304.herokuapp.com request_id=dedd394a-498a-464d-a669-ed19fa2fd418 fwd="188.83.235.112" dyno=web.1 connect=0ms service=58ms status=200 bytes=2753
2017-02-24T20:57:32.737531+00:00 app[web.1]: I, [2017-02-24T20:57:32.737424 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Started GET "/" for 188.83.235.112 at 2017-02-24 20:57:32 +0000
2017-02-24T20:57:32.740219+00:00 app[web.1]: I, [2017-02-24T20:57:32.740152 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Processing by PagesController#home as HTML
2017-02-24T20:57:32.752357+00:00 app[web.1]: I, [2017-02-24T20:57:32.752273 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Rendering pages/home.html.erb within layouts/application
2017-02-24T20:57:32.753153+00:00 app[web.1]: I, [2017-02-24T20:57:32.753082 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Rendered pages/home.html.erb within layouts/application (0.6ms)
2017-02-24T20:57:32.759595+00:00 app[web.1]: I, [2017-02-24T20:57:32.759524 #4] INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Completed 200 OK in 19ms (Views: 8.6ms | ActiveRecord: 0.0ms)
2017-02-24T20:57:32.929609+00:00 heroku[router]: at=info method=GET path="/assets/application-95163fa38446d1bb6139f870d5fb932af7fa47b347b8951923c32a4565386aa6.js" host=infinite-forest-28304.herokuapp.com request_id=80d55a95-cbe8-4982-a571-bc8850567a87 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:32.928158+00:00 heroku[router]: at=info method=GET path="/assets/application-5ed627eba0abe94ba4e2c255c2298f55d9bca9b4ea45ded59ba1705edc5385d0.css" host=infinite-forest-28304.herokuapp.com request_id=a9c456f3-e7cd-4d6a-865f-2c8f5efbdaa7 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.143930+00:00 heroku[router]: at=info method=GET path="/assets/font-awesome/fontawesome-webfont-2932abf996373e87fbf2e950876b1962f1b57db954a1643ea68831d9fbb74da4.woff2?v=4.6.2" host=infinite-forest-28304.herokuapp.com request_id=90d78563-eaa6-4f24-a054-5c89beada59c fwd="188.83.235.112" dyno=web.1 connect=3ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.402193+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=7c20311c-bd5a-46c3-a9d5-c6266c1f9331 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:50.706814+00:00 heroku[router]: at=info method=GET path="/contact-us" host=infinite-forest-28304.herokuapp.com request_id=0ec752b1-0d75-42dd-83f6-ecd127086bfb fwd="188.83.235.112" dyno=web.1 connect=0ms service=35ms status=200 bytes=4317
2017-02-24T20:57:50.651067+00:00 app[web.1]: I, [2017-02-24T20:57:50.650984 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Started GET "/contact-us" for 188.83.235.112 at 2017-02-24 20:57:50 +0000
2017-02-24T20:57:50.652579+00:00 app[web.1]: I, [2017-02-24T20:57:50.652518 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Processing by ContactsController#new as HTML
2017-02-24T20:57:50.669618+00:00 app[web.1]: I, [2017-02-24T20:57:50.669536 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Rendering contacts/new.html.erb within layouts/application
2017-02-24T20:57:50.681558+00:00 app[web.1]: I, [2017-02-24T20:57:50.681481 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Rendered contacts/new.html.erb within layouts/application (11.8ms)
2017-02-24T20:57:50.682909+00:00 app[web.1]: I, [2017-02-24T20:57:50.682846 #4] INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Completed 200 OK in 30ms (Views: 14.0ms | ActiveRecord: 7.5ms)
2017-02-24T20:59:14.426470+00:00 app[web.1]: I, [2017-02-24T20:59:14.426395 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Started POST "/contacts" for 188.83.235.112 at 2017-02-24 20:59:14 +0000
2017-02-24T20:59:14.427281+00:00 app[web.1]: I, [2017-02-24T20:59:14.427232 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Processing by ContactsController#create as HTML
2017-02-24T20:59:14.427366+00:00 app[web.1]: I, [2017-02-24T20:59:14.427324 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Parameters: {"utf8"=>"✓", "authenticity_token"=>"MgrtXM/8aUAYPnJ2ph4eIbsqMbLR/xXMZabcKmKh4myMlp0MdLJ2dCHnh7KshXSCqAsIzGQr0SdebpJw1v0QHw==", "contact"=>{"name"=>"Jesse Pinkman", "email"=>"jp#example.com", "comments"=>"Yo Beach!"}, "commit"=>"Submit"}
2017-02-24T20:59:14.429694+00:00 app[web.1]: D, [2017-02-24T20:59:14.429641 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] (0.9ms) BEGIN
2017-02-24T20:59:14.434537+00:00 app[web.1]: D, [2017-02-24T20:59:14.434485 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] SQL (1.3ms) INSERT INTO "contacts" ("name", "email", "comments", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Jesse Pinkman"], ["email", "jp#example.com"], ["comments", "Yo Beach!"], ["created_at", 2017-02-24 20:59:14 UTC], ["updated_at", 2017-02-24 20:59:14 UTC]]
2017-02-24T20:59:14.436712+00:00 app[web.1]: D, [2017-02-24T20:59:14.436665 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] (1.9ms) COMMIT
2017-02-24T20:59:14.441776+00:00 app[web.1]: I, [2017-02-24T20:59:14.441724 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Rendering contact_mailer/contact_email.html.erb
2017-02-24T20:59:14.442284+00:00 app[web.1]: I, [2017-02-24T20:59:14.442237 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Rendered contact_mailer/contact_email.html.erb (0.4ms)
2017-02-24T20:59:14.622612+00:00 app[web.1]: D, [2017-02-24T20:59:14.622518 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] ContactMailer#contact_email: processed outbound mail in 184.5ms
2017-02-24T20:59:14.749027+00:00 heroku[router]: at=info method=POST path="/contacts" host=infinite-forest-28304.herokuapp.com request_id=606794a4-3f9b-417c-b3ca-72af4d8bafb6 fwd="188.83.235.112" dyno=web.1 connect=0ms service=304ms status=500 bytes=1669
2017-02-24T20:59:14.722589+00:00 app[web.1]: I, [2017-02-24T20:59:14.722491 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Sent mail to samuelslmoreira#hotmail.com (99.8ms)
2017-02-24T20:59:14.722632+00:00 app[web.1]: D, [2017-02-24T20:59:14.722588 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Date: Fri, 24 Feb 2017 20:59:14 +0000
2017-02-24T20:59:14.722632+00:00 app[web.1]: From: jp#example.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: To: samuelslmoreira#hotmail.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: Message-ID: <58b09ea298a14_43fc0c75eb9c0103ae#71798652-2827-4935-9282-6b3ae7c47b44.mail>
2017-02-24T20:59:14.722634+00:00 app[web.1]: Subject: Contact Form Message
2017-02-24T20:59:14.722634+00:00 app[web.1]: Mime-Version: 1.0
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Type: text/html;
2017-02-24T20:59:14.722635+00:00 app[web.1]: charset=UTF-8
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2017-02-24T20:59:14.722636+00:00 app[web.1]:
2017-02-24T20:59:14.722636+00:00 app[web.1]: <!DOCTYPE html>
2017-02-24T20:59:14.722637+00:00 app[web.1]: <html>
2017-02-24T20:59:14.722637+00:00 app[web.1]: <head>
2017-02-24T20:59:14.722637+00:00 app[web.1]: </head>
2017-02-24T20:59:14.722638+00:00 app[web.1]: <body>
2017-02-24T20:59:14.722638+00:00 app[web.1]: <p>
2017-02-24T20:59:14.722638+00:00 app[web.1]: You have received a message from the site's contact form, from Jesse Pinkman, jp#example.com.
2017-02-24T20:59:14.722639+00:00 app[web.1]: </p>
2017-02-24T20:59:14.722639+00:00 app[web.1]: <p>
2017-02-24T20:59:14.722639+00:00 app[web.1]:
2017-02-24T20:59:14.722640+00:00 app[web.1]: </p>
2017-02-24T20:59:14.722640+00:00 app[web.1]: </body>
2017-02-24T20:59:14.722640+00:00 app[web.1]: </html>
2017-02-24T20:59:14.722825+00:00 app[web.1]: I, [2017-02-24T20:59:14.722779 #4] INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Completed 500 Internal Server Error in 295ms (ActiveRecord: 4.1ms)
2017-02-24T20:59:14.723286+00:00 app[web.1]: F, [2017-02-24T20:59:14.723242 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]
2017-02-24T20:59:14.723324+00:00 app[web.1]: F, [2017-02-24T20:59:14.723287 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:59:14.723325+00:00 app[web.1]: ):
2017-02-24T20:59:14.723357+00:00 app[web.1]: F, [2017-02-24T20:59:14.723324 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]
2017-02-24T20:59:14.723390+00:00 app[web.1]: F, [2017-02-24T20:59:14.723357 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] app/controllers/contacts_controller.rb:15:in `create'
2017-02-24T21:30:27.890702+00:00 heroku[router]: at=info method=GET path="/" host=infinite-forest-28304.herokuapp.com request_id=ef1e2185-e94e-4a90-907e-15dad519fd59 fwd="188.83.235.112" dyno=web.1 connect=1ms service=6ms status=200 bytes=2753
2017-02-24T21:30:27.866291+00:00 app[web.1]: I, [2017-02-24T21:30:27.866202 #4] INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Started GET "/" for 188.83.235.112 at 2017-02-24 21:30:27 +0000
2017-02-24T21:30:27.867090+00:00 app[web.1]: I, [2017-02-24T21:30:27.867030 #4] INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Processing by PagesController#home as HTML
2017-02-24T21:30:27.868034+00:00 app[web.1]: I, [2017-02-24T21:30:27.867962 #4] INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Rendering pages/home.html.erb within layouts/application
2017-02-24T21:30:27.868172+00:00 app[web.1]: I, [2017-02-24T21:30:27.868117 #4] INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Rendered pages/home.html.erb within layouts/application (0.0ms)
2017-02-24T21:30:27.869109+00:00 app[web.1]: I, [2017-02-24T21:30:27.869058 #4] INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
2017-02-24T21:30:28.039850+00:00 heroku[router]: at=info method=GET path="/assets/application-5ed627eba0abe94ba4e2c255c2298f55d9bca9b4ea45ded59ba1705edc5385d0.css" host=infinite-forest-28304.herokuapp.com request_id=f9b48384-ae99-4f9e-b035-6624ef9d2ce6 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T21:30:28.051038+00:00 heroku[router]: at=info method=GET path="/assets/application-95163fa38446d1bb6139f870d5fb932af7fa47b347b8951923c32a4565386aa6.js" host=infinite-forest-28304.herokuapp.com request_id=7b1f62bf-5aca-4ac1-b926-5c3219b3ccac fwd="188.83.235.112" dyno=web.1 connect=1ms service=2ms status=304 bytes=48
2017-02-24T21:30:28.279062+00:00 heroku[router]: at=info method=GET path="/assets/font-awesome/fontawesome-webfont-2932abf996373e87fbf2e950876b1962f1b57db954a1643ea68831d9fbb74da4.woff2?v=4.6.2" host=infinite-forest-28304.herokuapp.com request_id=d1522ce1-c16b-4525-aa55-08c6f45713c8 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T21:30:29.186402+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=1cec8754-06b9-4b20-ad32-77976a359e33 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
Read the error message:
Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
Just activate your account.
Ok. As the logs say and as #GrahamSlick already answered, your mailgun account is not verified. If you claim that the account is verified make sure that the credentials you used in
your config/environment.rb are the correct ones that belong to the verified account and ensure that heroku uses the correct credentials. The logs say that your account is not verified. May be you want to check your settings with mailgun again and see whether they tell you something about having an inactive account. Good luck.
You have to add a domain, verified it then you can send mails from mailgun.
I ran into the exact same issue. I even tried with just CURL to make sure it had nothing to do with rails or heroku. I double checked that my domain was validated.
I ended up opening a support ticket. They got back to me within a few hours and said "now its good to go" and sure enough it works.
So it's either bugs on their end, or they purposefully require manual oversight for some accounts. Not a great first impression, but it's good to see their support responded quickly.
Trying to run elastic search with bonsai and search kick on heroku. it says it is starting but i keep getting a Faraday::ConnectionFailed (Connection refused - connect(2)):
i am almost positive the bonsai URL is being set right.
any idea how to fix? been trying to dive into this but I'm stuck.
user.rb
require 'elasticsearch/model'
class User < ActiveRecord::Base
Elasticsearch::Model.client = Elasticsearch::Client.new url: ENV['BONSAI_URL'], log: true
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
search kick autocomplete: ['name']
gem file
gem 'elasticsearch-model'
gem 'elasticsearch-rails'
gem 'searchkick'
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
gem 'puma', '2.11.1'
gem 'bonsai-elasticsearch-rails', '~> 0.0.4'
end
Full logs
2016-03-12T04:24:03.741737+00:00 heroku[run.2718]: State changed from starting to up
2016-03-12T04:23:16.495563+00:00 app[web.1]: Starting up a new ElasticSearch client with https://xxxxxxx.us-east-1.bonsai.io
2016-03-12T04:23:17.157002+00:00 app[web.1]: [1m[36mUser Load (1.8ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1000[0m
2016-03-12T04:23:17.246641+00:00 app[web.1]: [3] Use Ctrl-C to stop
2016-03-12T04:23:17.250874+00:00 app[web.1]: [3] - Worker 0 (pid: 6) booted, phase: 0
2016-03-12T04:23:17.252056+00:00 app[web.1]: [3] - Worker 1 (pid: 10) booted, phase: 0
2016-03-12T04:23:17.600616+00:00 heroku[web.1]: State changed from starting to up
2016-03-12T04:23:56.953781+00:00 heroku[api]: Starting process with command `bash` by testtest#me.com
2016-03-12T04:24:03.284922+00:00 heroku[run.2718]: Starting process with command `bash`
2016-03-12T04:24:03.741737+00:00 heroku[run.2718]: State changed from starting to up
2016-03-12T04:27:46.959226+00:00 heroku[slug-compiler]: Slug compilation started
2016-03-12T04:23:17.246505+00:00 app[web.1]: [3] * Listening on tcp://0.0.0.0:3243
2016-03-12T04:23:17.246641+00:00 app[web.1]: [3] Use Ctrl-C to stop
2016-03-12T04:23:17.250874+00:00 app[web.1]: [3] - Worker 0 (pid: 6) booted, phase: 0
2016-03-12T04:23:17.600616+00:00 heroku[web.1]: State changed from starting to up
2016-03-12T04:24:03.264844+00:00 heroku[run.2718]: Awaiting client
2016-03-12T04:24:03.284922+00:00 heroku[run.2718]: Starting process with command `bash`
2016-03-12T04:24:03.741737+00:00 heroku[run.2718]: State changed from starting to up
2016-03-12T04:27:46.959233+00:00 heroku[slug-compiler]: Slug compilation failed: unrecognized error 3e521316-8b6b-44bd-b313-e8b62d9f15b1
2016-03-12T04:29:39.843924+00:00 heroku[api]: Deploy 5c0b4bd by testtest#me.com
2016-03-12T04:29:39.843924+00:00 heroku[api]: Release v35 created by testtest#me.com
2016-03-12T04:29:39.972973+00:00 heroku[slug-compiler]: Slug compilation started
2016-03-12T04:29:40.048027+00:00 heroku[web.1]: Restarting
2016-03-12T04:29:40.049299+00:00 heroku[web.1]: State changed from up to starting
2016-03-12T04:29:42.417672+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-03-12T04:29:43.086852+00:00 app[web.1]: [3] - Gracefully shutting down workers...
2016-03-12T04:29:43.176481+00:00 app[web.1]: [3] === puma shutdown: 2016-03-12 04:29:43 +0000 ===
2016-03-12T04:29:43.176488+00:00 app[web.1]: [3] - Goodbye!
2016-03-12T04:29:43.816757+00:00 heroku[web.1]: Process exited with status 0
2016-03-12T04:29:46.716295+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
2016-03-12T04:29:49.157324+00:00 app[web.1]: [3] Puma starting in cluster mode...
2016-03-12T04:29:49.157437+00:00 app[web.1]: [3] * Version 2.11.1 (ruby 2.0.0-p648), codename: Intrepid Squirrel
2016-03-12T04:29:49.157472+00:00 app[web.1]: [3] * Environment: production
2016-03-12T04:29:49.157473+00:00 app[web.1]: [3] * Process workers: 2
2016-03-12T04:29:49.157474+00:00 app[web.1]: [3] * Preloading application
2016-03-12T04:29:50.759011+00:00 app[web.1]: Starting up a new ElasticSearch client with https://xxxxxx.us-east-1.bonsai.io
2016-03-12T04:29:51.430834+00:00 app[web.1]: 2016-03-12 04:29:51 +0000: HEAD https://xxxxxx.bonsai.io:443/users [status:200, request:0.017s, query:n/a]
2016-03-12T04:29:51.516765+00:00 app[web.1]: 2016-03-12 04:29:51 +0000: POST https://xxxxxxx.bonsai.io:443/users/user/_bulk [status:200, request:0.016s, query:0.005s]
2016-03-12T04:29:51.516810+00:00 app[web.1]: 2016-03-12 04:29:51 +0000: > {"index":{"_id":1}}
2016-03-12T04:29:51.516811+00:00 app[web.1]: {"id":1,"name":"Example User","email":"example#railstutorial.org","created_at":"2016-03-10T03:09:45.898Z","updated_at":"2016-03-10T03:09:45.898Z","password_digest":"$2a$10$/VQEZljtG.nQRuB20.UG1uSIQjtgk9KfzoXdUL4kGETwbZm/XPOma","remember_digest":null,"admin":true,"activation_digest":"$2a$10$jZpCLV4k2H5nuMCPVuZt7OzlUQjykQ0e7uwADb9AJ0vbrzHDw55La","activated":true,"activated_at":"2016-03-10T03:09:45.691Z","reset_digest":null,"reset_sent_at":null,"location":"New York","discipline":"Actor","slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516812+00:00 app[web.1]: {"index":{"_id":2}}
2016-03-12T04:29:51.516813+00:00 app[web.1]: {"id":2,"name":"test","email":"testtest#me.com","created_at":"2016-03-10T03:13:19.990Z","updated_at":"2016-03-10T03:13:19.990Z","password_digest":"$2a$10$LWDYy6Ek1zR925kLvHHP.uRSnL7hAFOiYcdPkHCdBdiHGjuC8fDTC","remember_digest":null,"admin":false,"activation_digest":"$2a$10$k1jFVFe4lZlI5ktt7RcJx.hxdjwGEQIEnsMnwCnxLS1lpBaXbsFUu","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516813+00:00 app[web.1]: {"index":{"_id":3}}
2016-03-12T04:29:51.516814+00:00 app[web.1]: {"id":3,"name":"test","email":"testtest#icloud.com","created_at":"2016-03-10T22:55:37.757Z","updated_at":"2016-03-10T22:55:37.757Z","password_digest":"$2a$10$06QP.eB.Srx2TvejUscyyOIuOnzGmEPewAvfxwE4pS9mm/jtpeyZ.","remember_digest":null,"admin":false,"activation_digest":"$2a$10$JdaYMdl8VQlFg7bkN2nClec/ZN49w5cno78LTj.vupqKN9.JOoSaa","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516814+00:00 app[web.1]: {"index":{"_id":4}}
2016-03-12T04:29:51.516815+00:00 app[web.1]: {"id":4,"name":"test","email":"test.test#gmail.com","created_at":"2016-03-11T17:38:17.019Z","updated_at":"2016-03-11T17:38:17.019Z","password_digest":"$2a$10$3EGEVSC1PmX03YMH7bBt7erWXu7ssVT0KdcVfD99.mwJ7oAdax7MS","remember_digest":null,"admin":false,"activation_digest":"$2a$10$MtJkJQMQ25tH6PIuZEjka.mtPitSbODwjJ8qkorAwrWhfdbGl5ZQ.","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516815+00:00 app[web.1]: {"index":{"_id":5}}
2016-03-12T04:29:51.516816+00:00 app[web.1]: {"id":5,"name":"test","email":"test#gioventunyc.com","created_at":"2016-03-11T17:41:22.759Z","updated_at":"2016-03-11T17:41:22.759Z","password_digest":"$2a$10$pj2f6Sw7Lk5Q/J6alKT.4.0XPIgqEV8BMAgars6WQbfXNqBPRBEZ2","remember_digest":null,"admin":false,"activation_digest":"$2a$10$dxECrTuI0/R7cZe69TVWSuvjrz7phhLQh22ZBfg7l9OG9yUm4QJGy","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516816+00:00 app[web.1]: {"index":{"_id":6}}
2016-03-12T04:29:51.516817+00:00 app[web.1]: {"id":6,"name":"test","email":"test#gioventu.nyc","created_at":"2016-03-11T17:45:29.749Z","updated_at":"2016-03-11T17:45:29.749Z","password_digest":"$2a$10$gZM6tMEnO1K2JU.J7Nlm9.Vl5JH4RE6px1F5N5KcbGB7GsoRXhSXG","remember_digest":null,"admin":false,"activation_digest":"$2a$10$Erg4aoSYbKaC9HB78O1yXO1Dw0K11sQ4IHYIp595etw2eMBIsiliq","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516817+00:00 app[web.1]: {"index":{"_id":7}}
2016-03-12T04:29:51.516818+00:00 app[web.1]: {"id":7,"name":"test","email":"rs#rrrr.nyc","created_at":"2016-03-12T04:06:14.603Z","updated_at":"2016-03-12T04:06:14.603Z","password_digest":"$2a$10$lKwxQS5Ff9eOti.YauPn8.y2JjHocgwWpJk8sWjtwJFtRxnjhEr1C","remember_digest":null,"admin":false,"activation_digest":"$2a$10$Z78l8dtLU5tJgbv70cdgU.dWvfR7zd1riskj59anTePdnBv7H/4IW","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516819+00:00 app[web.1]: {"index":{"_id":8}}
2016-03-12T04:29:51.516821+00:00 app[web.1]: {"id":8,"name":"test","email":"rrrr#nyu.edu","created_at":"2016-03-12T04:19:22.961Z","updated_at":"2016-03-12T04:19:22.961Z","password_digest":"$2a$10$eXku5S8nLGXkxYnfeMARgesXNG76qMnIsrmLrTdIngT4t8L.uqQy.","remember_digest":null,"admin":false,"activation_digest":"$2a$10$7m4IKtrQ4WDfXmElvI9./OfeqpJS1guGK.X31mM0DPoRCcfscbrwK","activated":false,"activated_at":null,"reset_digest":null,"reset_sent_at":null,"location":null,"discipline":null,"slack":null,"experiences":null,"portfolio":null,"card_token":null}
2016-03-12T04:29:51.516903+00:00 app[web.1]: 2016-03-12 04:29:51 +0000: < {"took":5,"errors":false,"items":[{"index":{"_index":"users","_type":"user","_id":"1","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"2","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"3","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"4","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"5","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"6","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"7","_version":4,"status":200}},{"index":{"_index":"users","_type":"user","_id":"8","_version":3,"status":200}}]}
2016-03-12T04:29:51.554058+00:00 app[web.1]: [3] * Listening on tcp://0.0.0.0:56115
2016-03-12T04:29:51.815153+00:00 heroku[web.1]: State changed from starting to up
2016-03-12T04:30:09.854889+00:00 app[web.1]: Started POST "/users" for 71.125.40.81 at 2016-03-12 04:30:09 +0000
2016-03-12T04:30:09.891335+00:00 app[web.1]: Processing by UsersController#create as HTML
2016-03-12T04:30:09.981602+00:00 app[web.1]: [1m[36mUser Exists (1.6ms)[0m [1mSELECT 1 AS one FROM "users" WHERE LOWER("users"."email") = LOWER('testtest#me.com') LIMIT 1[0m
2016-03-12T04:30:10.384702+00:00 heroku[router]: at=info method=POST path="/users" host=xxxx.herokuapp.com request_id=c95e17ca-3eb3-4dfb-9337-b393ad6826b4 fwd="71.125.40.81" dyno=web.1 connect=0ms service=526ms status=200 bytes=5915
2016-03-12T04:30:10.354983+00:00 app[web.1]: [1m[35m (0.9ms)[0m ROLLBACK
2016-03-12T04:30:10.360982+00:00 app[web.1]: Rendered shared/_error_messages.html.erb (1.1ms)
2016-03-12T04:30:10.363072+00:00 app[web.1]: Rendered users/new.html.erb within layouts/application (5.1ms)
2016-03-12T04:30:10.365694+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.3ms)
2016-03-12T04:30:10.369943+00:00 app[web.1]: Rendered layouts/_header.html.erb (3.7ms)
2016-03-12T04:30:10.370911+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.3ms)
2016-03-12T04:30:10.371340+00:00 app[web.1]: Completed 200 OK in 480ms (Views: 15.5ms | ActiveRecord: 3.3ms)
2016-03-12T04:30:14.904181+00:00 app[web.1]: Started GET "/login" for 71.125.40.81 at 2016-03-12 04:30:14 +0000
2016-03-12T04:30:14.958240+00:00 app[web.1]: Processing by SessionsController#new as HTML
2016-03-12T04:30:15.544900+00:00 heroku[router]: at=info method=GET path="/login" host=xxxx.herokuapp.com request_id=71f94b8f-7543-439e-833f-bf1161c1d37a fwd="71.125.40.81" dyno=web.1 connect=1ms service=633ms status=200 bytes=5561
2016-03-12T04:30:15.608618+00:00 heroku[router]: at=info method=GET path="/assets/application-6f5ae546d40366770d3a61453503cef12cb1811b5cf39fb0a67a1322f96873d9.css" host=xxxxx.herokuapp.com request_id=a2c69f95-d377-47a9-b1c7-5c4fb8594766 fwd="71.125.40.81" dyno=web.1 connect=0ms service=2ms status=200 bytes=29104
2016-03-12T04:30:15.518580+00:00 app[web.1]: Rendered sessions/new.html.erb within layouts/application (544.6ms)
2016-03-12T04:30:15.522546+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.3ms)
2016-03-12T04:30:15.529268+00:00 app[web.1]: Rendered layouts/_header.html.erb (6.1ms)
2016-03-12T04:30:15.530501+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.4ms)
2016-03-12T04:30:15.531077+00:00 app[web.1]: Completed 200 OK in 573ms (Views: 559.4ms | ActiveRecord: 0.0ms)
2016-03-12T04:30:15.645644+00:00 heroku[router]: at=info method=GET path="/assets/application-44f9363a0510d929eca5abc71e6baff54884aadab1c158713bd34869de9bf38c.js" host=xxxx.herokuapp.com request_id=3535b08a-2406-4d83-9e4e-22046b0e0db7 fwd="71.125.40.81" dyno=web.1 connect=0ms service=6ms status=200 bytes=123671
2016-03-12T04:30:17.308712+00:00 heroku[router]: at=info method=GET path="/password_resets/new" host=ancient-tor-3622.herokuapp.com request_id=9e49778c-5546-43d7-8990-fd543ad298b9 fwd="71.125.40.81" dyno=web.1 connect=0ms service=29ms status=200 bytes=5044
2016-03-12T04:30:17.269613+00:00 app[web.1]: Started GET "/password_resets/new" for 71.125.40.81 at 2016-03-12 04:30:17 +0000
2016-03-12T04:30:17.277696+00:00 app[web.1]: Processing by PasswordResetsController#new as HTML
2016-03-12T04:30:17.284988+00:00 app[web.1]: Rendered password_resets/new.html.erb within layouts/application (2.1ms)
2016-03-12T04:30:17.289052+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.4ms)
2016-03-12T04:30:17.292766+00:00 app[web.1]: Rendered layouts/_header.html.erb (1.5ms)
2016-03-12T04:30:17.294115+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.4ms)
2016-03-12T04:30:21.643797+00:00 app[web.1]: Started POST "/password_resets" for 71.125.40.81 at 2016-03-12 04:30:21 +0000
2016-03-12T04:30:21.745309+00:00 app[web.1]: [1m[33mUser Store (7.7ms)[0m {"id":2,"exception":["Faraday::ConnectionFailed","Connection refused - connect(2)"]}
2016-03-12T04:30:21.746719+00:00 app[web.1]: Completed 500 Internal Server Error in 100ms (Searchkick: 7.7ms | ActiveRecord: 9.8ms)
2016-03-12T04:30:21.751092+00:00 app[web.1]: Faraday::ConnectionFailed (Connection refused - connect(2)):
2016-03-12T04:30:21.751092+00:00 app[web.1]: app/models/user.rb:83:in `create_reset_digest'
2016-03-12T04:30:21.751093+00:00 app[web.1]: app/controllers/password_resets_controller.rb:13:in `create'
2016-03-12T04:30:21.836029+00:00 heroku[router]: at=info method=POST path="/password_resets" host=xxxxx.herokuapp.com request_id=69de3b2a-9f18-4a28-be0a-706a5dc9a341 fwd="71.125.40.81" dyno=web.1 connect=0ms service=181ms status=500 bytes=1714
I had to run heroku run rake search kick:reindex CLASS=User and it fixed it.
I remake my index and it works;
bundle exec rake searchkick:reindex:all
or if you want you could reindex item by item
Products.reindex
User.reindex