rake aborted! undefined method `task' for

rake aborted!
undefined method `task' for

这是因为又尝试升级到了rake 0.9

怎么办呢?
module ::Myapp
  class Application
    include Rake::DSL
  end
end

module ::RakeFileUtils
  extend Rake::FileUtilsExt
end



module ::Myapp改成自己的项目名字
放到
require 'rake' and MyApp::Application.load_tasks 

之间

要想降级回来的话

$ gem uninstall rake -v 0.9
$ gem install rake -v 0.8.7

Then, edit the Gemfile and add the line

gem 'rake', '0.8.7'

Lastly, just run the command

$ bundle update

你可能感兴趣的:(Ruby)