Save 36% for Black Friday! Learn more

New Discussion

Notifications

You’re not receiving notifications from this thread.

ActiveStorage Named Variants, Preprocessed Variants, and Representations for File Uploads in Rails Discussion

0
General

Hey all, we are using named variants with fixtures to both test and load example data in development. We started getting Foreign key violations found in your fixture data. errors and found we needed to create an empty test/fixtures/active_storage/variant_records.yml file to make sure the active_storage_variant_records table is cleared out properly when reloading the fixture data with rails db:fixtures:load.
Just sharing in case someone else comes across a similar issue.

Join the discussion
Create an account Log in