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