fixed include error by defining the function inside the rake task instead of including it