Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running rake schedulable:build_occurrences #19

Open
Dragsbaek opened this issue May 25, 2016 · 3 comments
Open

Error running rake schedulable:build_occurrences #19

Dragsbaek opened this issue May 25, 2016 · 3 comments

Comments

@Dragsbaek
Copy link

When running:
rake schedulable:build_occurrences

i get:
ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: column "schedules.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "schedules".* FROM "schedules" GROUP BY "schedules"."...
^
: SELECT "schedules".* FROM "schedules" GROUP BY "schedules"."schedulable_type"
/Users/thomas/.rbenv/versions/2.2.3/bin/bundle:22:in load' /Users/thomas/.rbenv/versions/2.2.3/bin/bundle:22:in

'
PG::GroupingError: ERROR: column "schedules.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "schedules".* FROM "schedules" GROUP BY "schedules"."...

Event model:
class Event < ActiveRecord::Base

SCHEDULABLE

acts_as_schedulable :schedule, occurrences: :event_occurrences

has_many :bookings, as: :bookable
end

@Davidzhu001
Copy link

I have the same problem+1

anyone has idea?

@rexblack
Copy link
Member

rexblack commented Jul 26, 2016

Did you test this with master branch?
A pull-request has been merged recently which handles a similar issue related to postgres:
#15

@devilankur18
Copy link

@rexblack master seems to be working for the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants