rich
rich copied to clipboard
PG::UndefinedTable: ERROR: relation "owners" does not exist
I followed the install instructions on readme but it gives the above-mentioned error when migrating. What's wrong? The platform is using:
ruby '1.9.3'
rails (3.2.13)
actionmailer (= 3.2.13)
actionpack (= 3.2.13)
activerecord (= 3.2.13)
activeresource (= 3.2.13)
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.2.13)
AND rich (1.4.6) jquery-rails kaminari mime-types paperclip rack-raw-upload rails (>= 3.2.0) sass-rails
The error is displayed as follows:
Help, please. I cannot solve this alone!!!
Did you tried with the latest version?
Are you using schema_plus gem? In the log you posted I see, that postgres is trying to create a foreign key to the table owner, which doesn't exist, because this is a polymorphic relation.
I you are using schema_plus, than you can skip the foreign_key creation by changing the rich migration:
t.integer :owner_id, foreign_key: false
If you are not using schema_plus than you have to figure out, why the migration is trying to create a foreign key, AFAIK Rails do not do this.