“pg_dump: invalid option — i” when migrating

后端 未结 5 901
闹比i
闹比i 2021-01-11 10:01

When I run rake db:migrate on my Rails project (3.2.22.2) I get pg_dump: invalid option -- i. Here\'s the full trace:

Celluloid 0.1         


        
5条回答
  •  -上瘾入骨i
    2021-01-11 10:28

    Alternatively, you could edit your local pg_dump to remove the -i option. Although individual installs may differ, here are the edits I made:

    The command iterates through all it's arguments (line 36):

    for (my $i = 0; $i <= $#ARGV; ++$i) {
    

    Find the conditional (line 39):

    if ($ARGV[$i] eq '--cluster') {
    

    Add the following (line 57):

    } elsif ($ARGV[$i] eq '-i') {
        splice @ARGV, $i, 1;
    }
    

提交回复
热议问题