running the rake task through a function in rails code example Example: run rake task rails $ bin/rake task_name