Richlewis
Richlewis

Reputation: 15384

Run a rake task rails

I am trying to get a rake task to run, basically a screen grab and then post the data to a model. I have a task but not sure on how to get it to run

namespace :grab do
task :fixtures => :environment do
MatchFixtures::MatchFixtures.new.perform
end
end

Im way out here but i thought it was

rake namespace:task

but i get

dont know how to build task 'namespace:task'

Where am i going wrong?

Upvotes: 0

Views: 96

Answers (1)

Dave S.
Dave S.

Reputation: 6419

You're supposed to substitute your own namespace/tasks in there, so:

rake grab:fixtures

Upvotes: 2

Related Questions