Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9124275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:32:09+00:00 2026-06-17T06:32:09+00:00

I have added a new task to my RakeFile (I know the new way

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:32:10+00:00Added an answer on June 17, 2026 at 6:32 am

    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
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my lib/tasks folder I added a new .rake file. In the rake task,
As some may have seen in .NET 4.0, they've added a new namespace System.Threading.Tasks
My storyboard seems locked. I have added new labels and imageviews to two different
I have added a new job in my hudson server which builds the project
I have IIS 7.5 With one web site I added new virtual directory and
Most of my content is in a new table I have added to JOOMLA
I have a list within Sharepoint, using a custom new form I have added
We recently added a new TeamCity build agent. Because it doesn't have ASP.NET MVC
I have download the new Bing API C# file and added it to my
I am new to iphone development.I have created a UIview controller class and added

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.