I would simply like to display a .txt file located in my public directory onto a page. I apologise that this may seem novice but I am new to Ruby.
So far the ruby sinatra code reads:
get '/create' do
logfile = File.open("logfile.txt")
erb :create
end
and the erb reads:
<h2>Text file:</h2>
<%= logfile %>
Can someone tell me what I need to display this text file on my page?