I have some data in my development database that I would like to utilize as fixtures in my test environment. What is the best way in Rails 2.x to export a database table to
I have been using YamlDb to save the state of my database.
Install it with the following command:
script/plugin install git://github.com/adamwiggins/yaml_db.git
Use the rake task to dump the contents of Rails database to db/data.yml
rake db:data:dump
Use the rake task to load the contents of db/data.yml into the database
rake db:data:load
This is the creators homepage:
http://blog.heroku.com/archives/2007/11/23/yamldb_for_databaseindependent_data_dumps/