Project

General

Profile

Defect #22111

Updated by Toshi MARUYAMA about 9 years ago

Hello All, 

 I've downloaded the latest redmine from git. I've an issue to run the rake tasks. 

 Can anyone help me out. 

 My environment : 

 Ruby : 2.2.4p230 

 Rails : 4.2.5.1 

 The below issue occurring whenever running the rake tasks. 

 <pre> 
 ActiveRecord::StatementInvalid: PG::CannotCoerce: ERROR:    cannot cast type regcl 
 ass to text 
 LINE 1: SELECT t2.oid::regclass::text AS to_table, a1.attname AS col... 
                                  ^ 
 : SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS 
  primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on 
 _delete 
 FROM pg_constraint c 
 JOIN pg_class t1 ON c.conrelid = t1.oid 
 JOIN pg_class t2 ON c.confrelid = t2.oid 
 JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid 
 JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid 
 JOIN pg_namespace t3 ON c.connamespace = t3.oid 
 WHERE c.contype = 'f' 
   AND t1.relname = 'attachments' 
   AND t3.nspname = ANY (current_schemas(false)) 
 ORDER BY c.conname 

 PG::CannotCoerce: ERROR:    cannot cast type regclass to text 
 LINE 1: SELECT t2.oid::regclass::text AS to_table, a1.attname AS col... 
                                  ^ 
 </pre> 
 

Back