且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我仍然不赞成rake / rdoctask

更新时间:2023-02-19 13:37:05

您可以有多个版本您可以通过运行

  $ gem list 
=>查看它们。耙

(0.9.2.2,0.9.2,0.8.7)
定义版本,请在Gemfile中将其定义为

  gem'rake','0.8.7'

然后运行

  bundle update rake 

您的项目版本现在已在Gemfile中指定,并且您的警告也消失了。 / p>

I've made bundle update a now I have still rake/rdoctask deprecated warning after running rake command.

WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
    at /home/cheetah/.rvm/gems/ruby-1.8.7-p302@tobiska/gems/rake-0.9.2.2/lib/rake/rdoctask.rb

I tried to read this tip http://matthew.mceachen.us/blog/howto-fix-rake-rdoctask-is-deprecated-use-rdoc-task-instead-1169.html but my Rakefile is OK.

I have no idea, how to solve this problem. Any tips? Thanks a lot.

Martin

You can have multiple versions of rake on your system and you can view them by running

$ gem list
=> rake

(0.9.2.2, 0.9.2, 0.8.7) To define a version in my project, define it in the Gemfile as

gem 'rake', '0.8.7'

then run

bundle update rake

Your project version is now as specified in the Gemfile and your WARNING is now gone.