From: Mark Toth Date: 2007-12-29T04:59:08+09:00 Subject: Re: How to jump over the first line in a file? (newbie) Thomas Wieczorek wrote: > On Dec 28, 2007 8:12 PM, Mark Toth wrote: >> Stefano Crocco wrote: >> Hmmm, it sounds like a great idea! Can you please send me some code for >> it? >> > > Just add a sFile.gets before the while. Okeeeey, so you mean like this?: sFile.gets file = "filename.txt" File.open(file) do |sFile| while line = sFile.gets row = line.split("\t") a_product = Product.new( :sku => row[0] , :name => row[1] , :price => row[2] , a_product.save end end -- Posted via http://www.ruby-forum.com/.