Skip to content

Instantly share code, notes, and snippets.

@nruth
Created January 19, 2016 03:07
Show Gist options
  • Save nruth/a3bc1b75281109b036e4 to your computer and use it in GitHub Desktop.
Save nruth/a3bc1b75281109b036e4 to your computer and use it in GitHub Desktop.
rails migration pg_dump: invalid option -- 'i'

If you start to see something like this, e.g. on Heroku since they installed the postgres 9.5 client libraries on their dynos

/usr/lib/postgresql/9.5/bin/pg_dump: invalid option -- 'i'
Try "pg_dump --help" for more information.
rake aborted!
Error dumping database
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.4/lib/active_record/tasks/postgresql_database_tasks.rb:55:in `structure_dump'

Try upgrading rails, e.g. 4.2.4 -> 4.2.5. There's a commit that removes the --i option.

We found that despite the error, the migrations had been completed. But ignoring errors is a bad habit :)

@h0jeZvgoxFepBQ2C
Copy link

Having the same problem with Rails 3.2.21.. Any hints? :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment