Run Ruby file from html form submit
问题 I have a Ruby program that reads a file and returns a certain output. I have to now create a web app of this program using Sinatra. I created a form with all the file options and I want to now run that Ruby code with that selected file from the form after the submit button is pressed. Basically, I’m not sure how to get this external Ruby program to run with the the filename that was selected by the user from the HTML form . The Ruby program ( example.rb ) starts with the definition def read