thank you very much for your help.
I'm sorry but I can't get it running, because I don't know how to adapt my Ruby main.rb accordingly.
Please see the inital situation below.
get '/create' do
@logfile = File.open("logfile.txt","r")
@contents = @logfile.read
post '/create' do
@logfile = File.open("logfile.txt","w")
see HTML form of my initial post