在我创建了:
rails g pg_search:migration:dmetaphone我发现了一个错误:
Adding support functions for pg_search :dmetaphone
-- execute("CREATE OR REPLACE FUNCTION pg_search_dmetaphone(text) RETURNS text LANGUAGE SQL IMMUTABLE STRICT AS $function$\n SELECT array_to_string(ARRAY(SELECT dmetaphone(unnest(regexp_split_to_array($1, E'\\\\s+')))), ' ')\n$function$;\n")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedFunction: ERROR: function dmetaphone(text) does not exist
LINE 2: SELECT array_to_string(ARRAY(SELECT dmetaphone(unnest(rege...发布于 2014-09-23 22:16:16
听起来好像您忘记在系统上安装postgresql-contrib包了。
https://stackoverflow.com/questions/26005487
复制相似问题