How show message in text file on web page?


#1

Hello,
i want to read text file and then want to show message in text file on
web page.pls, introduce me how i can do. now i cant read file but i
don’t know how write script on rhtml for show the massage in text
file.

this is code in controller
def show
f = File.open("/…/test.txt,“r”)
while (line = f.gets)
end
f.close()
end
pls, help me what next step i do?
thank you