rubyist / guard-rake

guard-rake runs a rake task when files change
MIT License
94 stars 32 forks source link

Rake task db:seed doesn't do anything #18

Closed jmuheim closed 11 years ago

jmuheim commented 12 years ago

Hello!

I have the following in my Guardfile:

guard 'rake', :task => 'db:seed' do
  watch('db/seeds.rb')
end

My db/seeds.rb file looks like this:

Project.delete_all
Task.delete_all
p = Project.create!(name: 'Standard Project', description: 'Please add your own projects!')
p.positions.create!(name: 'Read some books')
p.positions.create!(name: 'Meeting with Fredy')
p.positions.create!(name: 'Meeting with Albert')

When I'm manually doing rake db:seed, everything works as expected. When I'm saving my db/seeds.rb file, Guard shows running db:seed, but nothing is actually done. What's wrong? Thanks.

rubyist commented 11 years ago

I've created a sample rails project and set it up with guard-rake 0.0.9 and db:seed is run as it should be. Please re-open if you're still having trouble with this.