Take the 2-minute tour ×

How do I use a YAML file instead of seeds.rb to load the initial data into a database?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Check out the Ruby on Rails Guide to fixtures:


Generally, you can create YAML fixture files in the test/ directory and then load them into your database using the rake db:fixtures:load command. The full documentation on all the cool things you can do with fixtures is here:


share|improve this answer
Will the same thing work for development or production? –  fijiaaron Feb 27 '13 at 19:34
add comment

Your Answer


