0

在我创建了:

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...
4

1 回答 1

1

听起来您忘记postgresql-contrib在系统上安装该软件包。

于 2014-09-23T22:16:16.303 回答