title: Rhomobile: Read txt file and show content Ruby
body: <p>i want to open, read and show a txt file in my Rhomobile app.
  First, i want to show the complete content of the file. But here is my problem.</p>
  
  <pre><code>def text
  fileName = File.join(Rho::RhoApplication::get_base_app_path(), '/app/test.txt')
      f = File.open(fileName, 'r')
      while line = f.gets
      puts line
      end
    f.close
      redirect :action =&gt; :index  
      end
  </code></pre>
  
  <p>the code read the txt file, but how can i call the method and show the results on a page.
  I don´t know whats the varaible is?</p>
  
  <p>Please help me :) Thanks a lot!</p>