Fix for -> PG::Error: ERROR: duplicate key value violates unique constraint
# 'users' is whatever table you need to fix.
# http://stackoverflow.com/questions/13670235/after-importing-data-in-postgresql-duplicate-key-value-violates-unique-constrai
ActiveRecord::Base.connection.reset_pk_sequence!('users')