If I delete my development database and try to restore its schema
using migrations, factory_girl loads as part of the migration process
before any migrations are run. It tries to use one of my ActiveRecord
objects before the tables in the database are created by my
migrations, causing an error like this (when using Postgres):
rake aborted!
PGError: ERROR: relation "licenses" does not exist
: 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 = '"licenses"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Any thoughts on why factory_girl is attempting to load itself before
my migrations run?
--
Individuals over processes. Interactions over tools. Agile Rails training from thoughtbot, the makers of Clearance, Shoulda, & Factory Girl:
http://thoughtbot.com/services/training
You received this message because you are subscribed to the "factory_girl" mailing list.
To post to this group, send email to
factor...@googlegroups.com
To unsubscribe from this group, send email to
factory_girl...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/factory_girl?hl=en