Relation “translations” does not exist after migrating to Rails 3.2.1
-
26-04-2021 - |
Frage
I migrated from Rails 3.1.3 to 3.2.1 and got the following error when loading the home page:
PGError: ERROR: relation "translations" does not exist
LINE 4: WHERE a.attrelid = '"translations"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"translations"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
This happens when globalize3 gem tries to build the relation between page_meta_tags and page_meta_tag_translations tables. Everything worked fine on Rails 3.1.3. Can it be due to new Active Record and globalize3 incompatibility? Anyone has the same thing?
class PageMetaTag < ActiveRecord::Base
translates :title, :description, :keywords
accepts_nested_attributes_for :translations
end
Lösung
try using globalize3 beta:
gem 'globalize3', '0.2.0.beta8'
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow