Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG::UndefinedTable: ERROR: relation "owners" does not exist #153

Open
servisof opened this issue May 7, 2014 · 3 comments
Open

PG::UndefinedTable: ERROR: relation "owners" does not exist #153

servisof opened this issue May 7, 2014 · 3 comments
Labels

Comments

@servisof
Copy link

servisof commented May 7, 2014

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:
seleccin_004

@servisof
Copy link
Author

Help, please. I cannot solve this alone!!!

@renews renews added the Fix-me label Jun 18, 2014
@renews
Copy link
Contributor

renews commented Jun 18, 2014

Did you tried with the latest version?

@Szeliga
Copy link

Szeliga commented Jul 16, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants