Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined method 'task' using rake 0.9.0 #428

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

Undefined method 'task' using rake 0.9.0 #428

phstc opened this issue May 22, 2011 · 5 comments

Comments

@phstc
Copy link

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
Copy link
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
Copy link
Author

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
Copy link
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
Copy link
Author

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
Copy link
Collaborator

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 as completed May 22, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants