简体   繁体   中英

Generating fixtures from database in Rails 3

I want to generate fixtures from the development database in Rails 3.1. I tried using the yaml files created by yaml_db, but their structure is different from that of fixtures.

I am trying to get ar_fixtures to work, I put

gem 'ar_fixtures'

in my Gemfile and did a bundle install but "rake -T" doesnt show anything new.

That gem is years old and not 3.1 compatible likely. If you're ok with the fixtures being dumped into a single file, check out the 'yaml_db' gem on github

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM