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

Errore nella home page con PostgreSQL #66

Open
tommyblue opened this issue Sep 4, 2013 · 0 comments
Open

Errore nella home page con PostgreSQL #66

tommyblue opened this issue Sep 4, 2013 · 0 comments
Assignees

Comments

@tommyblue
Copy link
Owner

Nel fare il nuovo sito demo ho usato Postgres. Al login viene fuori questo errore. Nel db c'è soltanto l'utente demo, non altro
@duncanita riesci a darci un'occhiata?

ActionView::Template::Error (PG::GroupingError: ERROR:  column "invoices.date" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...s.date)  ORDER BY month_number, EXTRACT(YEAR FROM invoices.d...
                                                             ^
: SELECT EXTRACT(MONTH FROM invoices.date) AS month_number, SUM(slips.rate) AS month_income FROM "invoices" INNER JOIN "slips" ON "slips"."invoice_id" = "invoices"."id" INNER JOIN "customers" "customers_invoices" ON "customers_invoices"."id" = "invoices"."customer_id" INNER JOIN "customers" ON "invoices"."customer_id" = "customers"."id" WHERE "customers"."user_id" = $1 AND (EXTRACT(YEAR FROM invoices.date) = 2013 AND invoices.paid = 't') GROUP BY EXTRACT(MONTH FROM invoices.date)  ORDER BY month_number, EXTRACT(YEAR FROM invoices.date), invoices.number, invoices.id):
    1: <%
    2:   invoices = []
    3:   @this_year.each do |invoice|
    4:     invoices << "{'x' : #{invoice.month_number}, 'y': #{invoice.month_income}}"
    5:   end
    6:   invoices = ["{'x': 0, 'y': 0}"] if invoices.size == 0
  app/views/dashboard/_incomes_this_year.html.erb:3:in `_app_views_dashboard__incomes_this_year_html_erb___42588926623323659_69927869341140'
  app/views/dashboard/index.html.erb:14:in `_app_views_dashboard_index_html_erb__4407725482129800723_69927870417740'
@ghost ghost assigned duncanita Sep 4, 2013
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

2 participants