Closed marko07 closed 10 years ago
What about rake db:migrate
?
That's the issue, when i try to run the migrations (rake db:migrate, rake db:setup) there comes up the error that I explained you
Anyone has an idea what is going on?
The error is saying the Products table does not exist in your postgres database. You must generate and run a migration that creates the Products table before adding acts_as :product to your subclass.
Add an empty model in migraion
Hi guys,
Am having an issue and i don't know what is going on, after i added the gem act_as_relation when i try to run the migrations am having this error
bundle exec rake db:setup rake aborted! PG::Error: ERROR: relation "products" does not exist LINE 5: WHERE a.attrelid = '"products"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"products"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum
I have a product model that act as a superclass, and i have two other models than acts as products.
If i comment out the lines that calls the gem: acts_as_superclass acts_as :product
The migrations works again
what could be the error?