You're calling transcode as a class method, so change the transcode method to:
def self.transcode
puts "Transcoding"
end
Or more likely what you want: you can create an instance of ProfileVideo and call transcode on that, and leave the transcode method as it is:
task :transcode => :environment do
pv = ProfileVideo.new(attributes)
pv.transcode
end