Rake post without confirmation


I need to play lof ot rake posts:remap

Is ti possible to force (without a confirmation Y/n) ?

thanks for help


1 Like

I’d do it from rails and skip the rake task. Administrative Bulk Operations might offer some hints on how to do that.

@pfaffman ok thank you I will take a look.

Basically I already have a file with more than 500 url that I need to replace :

  1. rake posts:remap[“old_url1/”,“new_url1”]
  2. rake posts:remap[“old_url2/”,“new_url2”]
  3. etc

I will try to find how I can do with rails. But it will be great if we have switch like --force or --yes to avoid confirm.

Than you for your help

Here’s what I’d do:


If you wanted to use the rake task you can try doing a echo y| rake ... or just edit the rake task in ./lib/tasks

1 Like

@pfaffman an error with

But this work fine
echo y| rake posts:remap[“old_url1/”,“new_url1”]

Than you so much.

Glad that worked. The DbHelper needs to be run inside rails, not the shell.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.