I'm having trouble using the new rake db:seed function. I initially
built my app in Rails 3.2.2 but have updated and re-frozen the new
version (3.2.4) which is supposed to have the new data seeding
function. I created a seed.rb file at db/seed.rb that looks something
like this:
Just a note, you can restructure this to make it a little more DRY. I
find this easier to manage in the long run, particularly if I may need
to add more later.
Yeah, I thought of combining them into something like you suggested,
but wanted to get them working in the simplest form before I tried
complicating the file.
I'll try running it with an unfrozen rails later tonight. Don't have
access to an updated rails install right now...thus the frozen
rails
Tried it with an unfrozen rails install....still won't work. I also
stripped most of the seed data out of the file and condensed the
information for the one model I left in. This is the file in it's
entirety:
well...i feel like an idiot...the blog that I googled and found the
instructions for using this on said to use db/seed.rb. just changed it
to seeds.rb and it worked beautifully.