I am trying to upgrade my app from rails 3.2.18 to rails 4.0 and I'm stuck on an issue with rake.
I have a custom doc.rake task that overrides doc:app with the following code inside that worked fine on rails 3:
# Replace Rails' rake doc:app with ours, which uses yardoc
Rake::Task["doc:app"].clear.enhance do
# Uses .yardopts_app file in rails root
app_dir = 'doc/generated/app'
sh "rm -rf #{app_dir}"
sh "bundle exec yardoc --plugin rails --yardopts .yardopts_app"
app_doc_files_dir = "#{app_dir}/doc-files"
Dir.mkdir( app_doc_files_dir )
cp_r( 'doc/files/app/doc-files/.', app_doc_files_dir )
end
Since upgrading rails, any rake task I try to run fails with the error:
rake aborted!
Don't know how to build task 'doc:app'
I'm really at a loss as to why this is happening. I can't find any reference to rails 4 removing the default doc:app task, so it should still exist for me to overwrite.