Project

General

Profile

Actions

Defect #339

closed

PostgreSQL 上ではジョエルテストが動作しない

Added by Toshiyuki Ando over 11 years ago. Updated over 8 years ago.

Status:
終了(Closed)
Priority:
通常(Normal)
Target version:
Start date:
04/20/2010
Due date:
04/21/2010
% Done:

100%

Estimated time:
0.25 h
Spent time:

Description

やったこと

  1. PostgreSQL でマイグレーション
  2. ジョエルテストにアクセス
  3. エラーが発生

発生したエラー

ActiveRecord::StatementInvalid (RuntimeError: ERROR C42803 Mcolumn "joel_test_scores.id" must appear in the GROUP BY clause or be used in an aggregate function F.\src\backend\parser\parse_agg.c L330 Rcheck_ungrouped_columns_walker: SELECT * FROM "joel_test_scores" GROUP BY user_id):
vendor/plugins/redmine_joel_test/app/models/joel_test_score.rb:11:in `find_last_score_by_user'
vendor/plugins/redmine_joel_test/app/controllers/joel_test_controller.rb:70:in `find_average'
vendor/plugins/redmine_joel_test/app/controllers/joel_test_controller.rb:10:in `index'

予想

from 句に使う SQL文に ORDER BY かけているのが悪いんじゃないかと思われます。

Actions

Also available in: Atom PDF