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 :)
Thanks!