I am using seed.rb to populate both my development and production database. I usually populate the first with dummy data and the latter with the real minimal data that my app ne
Another approach could be creating:
db/seeds/development.rb
db/seeds/production.rb
db/seeds/any_other_environment.rb
Then in db/seeds.rb
:
# Code you want to run in all environments HERE
# ...
load(Rails.root.join( 'db', 'seeds', "#{Rails.env.downcase}.rb"))
Then write the code you want to run for each environment in the respective file.