Things I learned when exploring an apparent issue with the
composite_primary_keys
gem:
-
The seed_dump gem is a great way to capture the contents of a production database so that you can debug locally.
-
Similarly,
rake db:dump
is good for capturing the schema of a production database. -
rails g task
generates a skeleton rake task which has a database connection and access to the project’s models. -
The rails project has great bug report templates for creating stand-alone programs that reproduce an active-record issue.