Simple rails rake task refuse to run with error “Don’t know how to build task”, why? April 26, 2023 by Tarik Rename your file to reindex.rake and it should work. Related: How to build task ‘db:populate’