Rake Tasks

Learn about Rake tasks in our Rails application.

We'll cover the following

Sometimes, we need to initiate some logic without having a web view to trigger it. This is where Rake tasksUser-defined rake tasks live inside the lib/tasks folder. Any file ending in .rake will be automatically picked up and loaded by Rails. come in. There are two problems in managing Rake tasks:

  • Naming/organizing
  • Code

Before that, let’s talk briefly about what should be in a Rake task.

Get hands-on with 1200+ tech skills courses.