Exporting and Import Heroku DB

Recently I was playing around with my local database in my rails project, eventually I screw up, I had to delete all the data. I use rake db:resetand rake db:create but how I was going to get all the data again, manually ? No way.


Rails Postgresql Error ORDER clause

Postgresql ORDER clause or be used in a aggregate function

While working in a rails project recently, I step on an error that say: PG::Error: ERROR: column "number" must appear in the GROUP BY clause or be used in an aggregate function, I didn’t have any idea how to solve it.