SeedMe - Creating a data seed file from your Rails development database

I ran into a situation last night where I was trying to get a skeleton site up on heroku, but I wanted to include the data I had created in my dev db. There wasn’t a ton of data, but I still didn’t want to create it again manually. (That heroku run console can end up cost you money…like whole penneis…)

After a quick Google search didn’t find me anything that fit the bill, I set to build a quick a dirty one…and 30 minutes later I had SeedMe.

Source: http://github.com/markmcspadden/seed_me

Download: https://rubygems.org/gems/seed_me

All SeedMe does is look at your database (using ActiveRecord) and then creates a db/seeds.rb file that you can in turn use to populate other databases with ‘rake db:seed’

There’s probably other stuff out there that does this, and this gem is very basic so your mileage may vary. But I do like the functionality…and even more so like that I was able to get the problem solved and turned into a gem in such a short timeframe. Yahoo for code!