title: Migrate not working on Heroku
body: <p>I've run <code>pg:reset</code> on Heroku and on trying to run <code>db:migrate</code>, all migrations run but the migration fails with the following error and trace:</p>
  
  <pre><code>rake aborted!
  Error dumping database
  /app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/tasks/postgresql_database_tasks.rb:55:in `structure_dump'
  /app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/tasks/database_tasks.rb:142:in `structure_dump'
  /app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/railties/databases.rake:288:in `block (3 levels) in &lt;top (required)&gt;'
  /app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/railties/databases.rake:51:in `block (2 levels) in &lt;top (required)&gt;'
  /app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/railties/databases.rake:45:in `block (2 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>As can be seen <a href="https://github.com/rails/rails/blob/master/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb" rel="noreferrer">here</a> the problematic line and the one above it are:</p>
  
  <pre><code>command = "pg_dump -i -s -x -O -f #{Shellwords.escape(filename)} #{search_path} #{Shellwords.escape(configuration['database'])}"
  raise 'Error dumping database' unless Kernel.system(command)
  </code></pre>
  
  <p>This works locally without any problems, both in development and production environments.</p>
  
  <p>Has anyone experienced anything like this?</p>