HOWTO: Fix “rake/rdoctask is deprecated. use rdoc/task instead”

Seeing this?

rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)

Edit your Rakefile and change these lines:

require 'rake/rdoctask'
Rake::RDocTask.new(:rdoc) do |rdoc|
 ...

to look like this:

require 'rdoc/task'
RDoc::Task.new do |rdoc|
  ...

You may need to add gem 'rdoc' to your Gemfile, too. While you’re at it, you might want to add rdoc/ to your .gitignore, too

Related posts:

  1. Creating acts_as_… gems for Rails 3.1.x
    There are a lot of posts on how to build rubygems. With Rails 3.1, though, they’re all old and busted. The new hotness is built right into rails now. Just......
  2. Quick MacPorts Installation of Ruby on Rails
    October 2010 update: I wrote this a while back, before I knew about RVM. The Ruby Version Manager has a bunch of features that makes it better than macports for......
  3. Rails 3.0.5 broke my routes and kicked my dog
    We just upgraded AdGrok from Rails 3.0.4 to 3.0.5, which was released a couple days ago. This is a “patch release,” which according to the rules, has only backwards compatible......
  4. java rake db:migrate implementations
    I was surprised that there were so many libraries that do the same thing — manage change in  your database schema. Here’s what I’ve found so far: Liquibase (migrations are......

  • http://twitter.com/goyox86 goyox86

    Nice! I worked in a Rails 2.3.10 app:

    I did what you say and added ‘rdoc’ to my Gemfile.

    Thx very much.

  • MrBarrettGriffith

    awesome

  • Emerson Lackey

    Thanks, helped me get my old 2.3.12 app up and running

  • Ajay Singh

    great post. very helpfull

  • Balach Hussain

    Hi, I got the deprecated error and did as suggested in your post and now I’m getting this error when I do rake db:create
    rake aborted!/Users/[my project directory]/Rakefile:11: syntax error, unexpected $end(See full trace by running task with –trace)

    Any hints?

  • http://jirapong.myopenid.com/ Jirapong

    This remove annoying message, thank you very much.

  • Akshay

    worked….! Thanks

  • Suryakencanacorp

    i cannot mention it ..LOL