I have a simple database table called \"Entries\":
class CreateEntries < ActiveRecord::Migration
def self.up
create_table :entries do |t|
t.st
If you're simply wanting to get the csv database yourself from the console you can do so in a few lines
tags = [Model.column_names]
rows = tags + Model.all.map(&:attributes).map(&:to_a).map { |m| m.inject([]) { |data, pair| data << pair.last } }
File.open("ss.csv", "w") {|f| f.write(rows.inject([]) { |csv, row| csv << CSV.generate_line(row) }.join(""))}