ERROR: 'rake/rdoctask' is obsolete and no longer supported

后端 未结 5 1629
野的像风
野的像风 2021-01-15 18:09

Out of the blue, I started getting the following error message:

(in /Users/me/.rvm/gems/ruby-1.9.3-p125@mysql2/gems/rails-0.9.5)
rake aborted!
ERROR: \'rake/         


        
5条回答
  •  无人共我
    2021-01-15 18:30

    Upgrading to rails 4.0.0 I got the same error.

    rails -v
    (in /Users/oma/.rvm/gems/ruby-2.0.0-p247/gems/rails-0.9.5)
    rake aborted!
    ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead.
    /Users/oma/.rvm/gems/ruby-2.0.0-p247/gems/rails-0.9.5/Rakefile:3:in `'
    (See full trace by running task with --trace)
    

    To upgrade, I removed the version number in Gemfile

     source 'https://rubygems.org'
     gem 'rails'   # NO VERSION
    

    and did bundle update as I thought this would pick the last. But somehow, I got rails 0.9.5. It feels like some practical joke, really, lol

    $ gem list rails
    rails (4.0.1.rc2, 4.0.0, 0.9.5)
    

    I can't tell you with 100% certainty that this was the cause, but we were two people, working on the same branch and seeing the same error. The fix worked for both of us. Simply

    specify rails version!

    $gem uninstall rails -v 0.9.5
    Gemfile
      source 'https://rubygems.org'
      gem 'rails', '4.0.0'
    

    then bundle, run rails -v, giggle (or cry) and get back to producing

提交回复
热议问题