I'm developing a web application using Ruby on Rails and running it on a Linux (ubuntu) server. My backend processing is based on a Windows .bat file that calls a network of other .bat files based on a list of about 5 parameters.
So basically, I'm trying to call the initial batch file with command line preferences through wine in my Rails application.
For example, this is similar to what I use to successfully run the code in the ubuntu terminal:
wine cmd.exe /C InitialCallFile.bat Directory/Input.xml Directory/Output.xml param1 param2
I tried to call it with the System and %x commands in Ruby. For example:
System "wine cmd.exe /C InitialCallFile.bat self.infile self.outfile self.param1 self.param2"
system wine cmd.exe InitialCallFile.bat [self.infile, self.outfile, self.param1, self.param2]
%x[wine cmd.exe /C InitialCallFile.bat self.infile self.outfile self.param1 self.param2]
and other similar variations
However, the program doesn't recognize cmd and comes back with the error: undefined local variable or method `cmd'
How should I go about correctly calling an application in wine using Ruby on Rails?