I have added a new task to my RakeFile (I know the new way of doing it is to add your task to lib/tasks, but other tasks are in the RakeFile and I dont wish to refactor just yet.) The task that I added accesses a model (maybe not though as the model name is not in the error) but wont access its method.
rake aborted!
undefined method `transcode' for #<Class:0x10700e878>
My task in the RakeFile is pretty simple;
namespace :casta do
desc "Transcode user videos from S3"
task :transcode => :environment do
ProfileVideo.transcode
end
end
And my model is as simple as it gets;
class ProfileVideo < ActiveRecord::Base
belongs_to :application_form
def transcode
puts "Transcoding"
end
end
My other RakeFile tasks use script/runner and they work perfectly fine.
rails 2.3.14
rake 0.8.7 (I was on 0.9.2 though downgraded to test)
Would love some insight, thanks.