Fix rake task error on production