create tab delimited text file

The code below should at least help get you on the right track.

Best,
Kevin Skoglund
http://www.nullislove.com

Or you could use CSV or FasterCSV with the option :col_sep=>"\t"

eg.

@orders=Order.find :all,

    @report= FasterCSV.generate({:col_sep=>"\t"}) do |csv|
      csv << ["order-id","quantity","ship-date"] # title row
      for o in @orders
        csv << [o.order_ref,o.quantity, o.ship_date]
      end
    end

Tonypm