run rake task code example Example 1: run task rails rake task_name Example 2: run rake task rails $ bin/rake task_name