Follow Along as I Stumble on the Path to Learning RoR

Posts tagged “export

Dump from PostgreSQL Using PGAdmin

I was having trouble figuring out how to dump the data from PostgreSQL with PGAdmin until I have this on PostgreSQL Tutorial.

Following the directions, I was able to do a dump as .tar file.  They also have instructions on how to restore it.

PostgreSQL Backup Database - pgadmin backup

pgAdmin backup options

pgAdmin backup dump options 1

pgAdmin backup dump options 2

pgAdmin backup messages



CSV Export

One gem to use to allow users to export table data, like reports, is FasterCSV.  The only thing is that there isn’t a lot of documentation on it.  Here is a great tutorial on it:

The only minor issue I ran into was that I needed to add this line:
@output_encoding = ‘UTF-8’

under the format.csv part, like so:

format.csv do
@output_encoding = ‘UTF-8’