Topic: calling a system function on the server


I'm new to rails comming from C, C++ and fortran. I made a website using rails + bootstrap + devise. Everything is going great, but I'm stuck at how to call server side functions. What I'm trying to do is: after the user is logged in, certain parts of the page become visible and in one of them the user can insert a number of parameters and files (I made the forms using javascript and html5 to upload the file). These files and parameters are the input for a numerical program written in fortran, which is on the server of course.

From the command line, to call the fortran program I would make a parameters file and execute the program. The parameters file had the name to other files that also requiered. I need to make this file with the parameters given at the webpage, and call the fortran program.

After the fortran program is called, I'll read the ouput and plot it at the page.

I was told to look at AJAX, but I'm going crazy with this. I need basically two things: create a file at the server, and execute a command at the server.

Let's say that you want to execute the command