Skip to content

Instantly share code, notes, and snippets.

@esteedqueen
Forked from nruth/migration-error.md
Created November 8, 2016 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esteedqueen/1209df31c25bda0961d648336eea9bd1 to your computer and use it in GitHub Desktop.
Save esteedqueen/1209df31c25bda0961d648336eea9bd1 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 :)

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