Undefined method 'task' using rake 0.9.0 #428

phstc opened this Issue May 22, 2011 · 5 comments


None yet

3 participants

phstc commented May 22, 2011


I got the same problem noticed in this thread on stackoverflow

This solution worked for me

My Rakefile to fix the problem

# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)
require 'rake'

module ::Project1
  class Application
    include Rake::DSL

module ::RakeFileUtils
  extend Rake::FileUtilsExt


It doesn't look RA specific, is it?
Anyway, rake 0.9.0.beta.4 shouldn't get bundled with rails 3.0.3, this is nonsense.

phstc commented May 22, 2011

Actually my Rails is 3.0.7 and my Rake is 0.9.0. My environment isn't exactly the same as the thread. If it's nonsense. We can just close this issue. No problem for me. ;)


I meant a beta gem shouldn't be allowed to be bundled with a rails stable gem :)
So this mean that the rake 090beta4 pb wasn't solved in the final 0.9 release?

And is that pb related to RA in some way?

phstc commented May 22, 2011

I'm getting this the error with 0.9.0 release.

"And is that pb related to RA in some way?"

Maybe, I don't know. I need to investigate more about the problem.

sferik commented May 22, 2011

This is a general Rails problem: http://twitter.com/dhh/status/71966528744071169

There should be a 3.0.8 release soon that fixes it. In the mean time, you can add the following line to your Gemfile:

gem 'rake', '~> 0.8.7'
@sferik sferik closed this May 22, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment