From: Ben Lovell Date: 2009-04-21T00:33:45+09:00 Subject: Re: Question about displaying the content of a file with Ramaze --001636c5b36156d1970467fe41c3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Mon, Apr 20, 2009 at 3:08 PM, Ruby Student wrote: > Hi all, > I am trying to learn Ramaze and as such I am playing with a very simple > script to display the content of a file on a browser. > My problem begins when I send multiple records to the browser. > Everything is displayed as a long string without end of line. If I edit the > same file with any editor everything looks fine. > > the_list = > File.readlines("F:/$user/ruby/Programs/DejaVou/2009/bmwlist.txt") > the_list.each do |line| > line_ary << line > > Newline characters are not interpreted by a browser so you need to append a "
" tag to each line. Ideally you should be doing this in a view instead. Ben --001636c5b36156d1970467fe41c3--