run rake task from controller method in rails code example Example: run rake task rails $ bin/rake task_name