Adding a custom seed file
I want to populate a new feature with dummy data, but don't want to use the db/seeds.rb file as it already has seeds other data irrelevant for this feature. To run the default seeds.rb file, you run the command rake db:seed . If I create a file in the db directory called seeds_feature_x.rb , what would the rake command look like to run (only) that file? zeantsoi Start by creating a separate directory to hold your custom seeds – this example uses db/seeds . Then, create a custom task by adding a rakefile to your lib/tasks directory: # lib/tasks/custom_seed.rake namespace :db do namespace :seed