Undefined method 'task' using rake 0.9.0 #428

Closed
phstc opened this Issue May 22, 2011 · 5 comments

Projects

None yet

3 participants

@phstc
phstc commented May 22, 2011

Hi

I got the same problem noticed in this thread on stackoverflow
http://stackoverflow.com/questions/5287121/undefined-method-task-using-rake-0-9-0-beta-4

This solution worked for me
http://stackoverflow.com/questions/5287121/undefined-method-task-using-rake-0-9-0-beta-4/5290331#5290331

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
  end
end

module ::RakeFileUtils
  extend Rake::FileUtilsExt
end

Project1::Application.load_tasks
@bbenezech
Collaborator

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
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. ;)

@bbenezech
Collaborator

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
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
Owner
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