From: Ruby Student Date: 2009-04-21T01:48:29+09:00 Subject: Re: Question about displaying the content of a file with Ramaze --0016364eca9e4e28670467ff4c91 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Mon, Apr 20, 2009 at 11:33 AM, Ben Lovell wrote: > 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 > Ben, Thank you for your answer. I'll try using a "view" as you suggested. -- Ruby Student --0016364eca9e4e28670467ff4c91--