问题 I want to invoke my rake task from console. Is it doable? if yes, how to do so? I tried this on console: require 'rake' Rake::Task['my_task'].invoke but it give me this error: RuntimeError: Don't know how to build task it's like the rake cannot found the task. any help would be appreciated. Thank you Edit: I am using rails 2.3.5 回答1: Running your Rake tasks requires two steps: Loading Rake Loading your Rake tasks You are missing the second step. Normally this is done in the Rakefile, but you