Skip to content

Instantly share code, notes, and snippets.

@ckib16
Created June 27, 2015 20:49
Show Gist options
  • Save ckib16/608126d0d06ab9a09a51 to your computer and use it in GitHub Desktop.
Save ckib16/608126d0d06ab9a09a51 to your computer and use it in GitHub Desktop.
PG error in Heroku for RegisteredApplications#show
Jun 27 13:39:00 quickmetrics app/web.1: Started GET "/registered_applications/1" for 96.255.46.237 at 2015-06-27 20:39:00 +0000
Jun 27 13:39:00 quickmetrics app/web.1: Parameters: {"id"=>"1"}
Jun 27 13:39:00 quickmetrics app/web.1: CACHE (0.0ms) SELECT "registered_applications".* FROM "registered_applications" WHERE "registered_applications"."id" = $1 LIMIT 1 [["id", "1"]]
Jun 27 13:39:00 quickmetrics app/web.1: ActiveRecord::StatementInvalid (PG::GroupingError: ERROR: column "events.created_at" must appear in the GROUP BY clause or be used in an aggregate function
Jun 27 13:39:00 quickmetrics app/web.1: LINE 1: ...ation_id" = $1 GROUP BY "events"."name" ORDER BY created_at...
Jun 27 13:39:00 quickmetrics app/web.1: ^
Jun 27 13:39:00 quickmetrics app/web.1: : SELECT COUNT(*) AS count_all, name AS name FROM "events" WHERE "events"."registered_application_id" = $1 GROUP BY "events"."name" ORDER BY created_at DESC):
Jun 27 13:39:00 quickmetrics app/web.1: app/controllers/registered_applications_controller.rb:20:in `show'
Jun 27 13:39:00 quickmetrics app/web.1: Started GET "/registered_applications/1" for 96.255.46.237 at 2015-06-27 20:39:00 +0000
Jun 27 13:39:00 quickmetrics app/web.1: CACHE (0.0ms) SELECT "registered_applications".* FROM "registered_applications" WHERE "registered_applications"."id" = $1 LIMIT 1 [["id", "1"]]
Jun 27 13:39:00 quickmetrics app/web.1: ActiveRecord::StatementInvalid (PG::GroupingError: ERROR: column "events.created_at" must appear in the GROUP BY clause or be used in an aggregate function
Jun 27 13:39:00 quickmetrics app/web.1: LINE 1: ...ation_id" = $1 GROUP BY "events"."name" ORDER BY created_at...
Jun 27 13:39:00 quickmetrics app/web.1: ^
Jun 27 13:39:00 quickmetrics app/web.1: : SELECT COUNT(*) AS count_all, name AS name FROM "events" WHERE "events"."registered_application_id" = $1 GROUP BY "events"."name" ORDER BY created_at DESC):
Jun 27 13:39:00 quickmetrics app/web.1: app/controllers/registered_applications_controller.rb:20:in `show'
Jun 27 13:39:00 quickmetrics app/web.1: Processing by RegisteredApplicationsController#show as HTML
Jun 27 13:39:00 quickmetrics app/web.1: RegisteredApplication Load (0.9ms) SELECT "registered_applications".* FROM "registered_applications" WHERE "registered_applications"."id" = $1 LIMIT 1 [["id", 1]]
Jun 27 13:39:00 quickmetrics app/web.1: PG::GroupingError: ERROR: column "events.created_at" must appear in the GROUP BY clause or be used in an aggregate function
Jun 27 13:39:00 quickmetrics app/web.1: LINE 1: ...ation_id" = $1 GROUP BY "events"."name" ORDER BY created_at...
Jun 27 13:39:00 quickmetrics app/web.1: ^
Jun 27 13:39:00 quickmetrics app/web.1: : SELECT COUNT(*) AS count_all, name AS name FROM "events" WHERE "events"."registered_application_id" = $1 GROUP BY "events"."name" ORDER BY created_at DESC
Jun 27 13:39:00 quickmetrics app/web.1: Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.9ms)
Jun 27 13:39:00 quickmetrics app/web.1: Processing by RegisteredApplicationsController#show as HTML
Jun 27 13:39:00 quickmetrics app/web.1: Parameters: {"id"=>"1"}
Jun 27 13:39:00 quickmetrics app/web.1: RegisteredApplication Load (0.9ms) SELECT "registered_applications".* FROM "registered_applications" WHERE "registered_applications"."id" = $1 LIMIT 1 [["id", 1]]
Jun 27 13:39:00 quickmetrics app/web.1: PG::GroupingError: ERROR: column "events.created_at" must appear in the GROUP BY clause or be used in an aggregate function
Jun 27 13:39:00 quickmetrics app/web.1: LINE 1: ...ation_id" = $1 GROUP BY "events"."name" ORDER BY created_at...
Jun 27 13:39:00 quickmetrics app/web.1: ^
Jun 27 13:39:00 quickmetrics app/web.1: : SELECT COUNT(*) AS count_all, name AS name FROM "events" WHERE "events"."registered_application_id" = $1 GROUP BY "events"."name" ORDER BY created_at DESC
Jun 27 13:39:00 quickmetrics app/web.1: Completed 500 Internal Server Error in 6ms (ActiveRecord: 0.9ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment