I have a C# console app that parses through data in a UDB database and inserts it into a SQL database which works fine. I also have a ruby script that parses a text file and inserts data into the same SQL db. The ruby script also runs without error when run on its own.
I know it would have been more simple to just do both from the c# app, however, I wrote the script in Ruby 1.9.2 for the pure fact of learning the lang. The c# app is dependent on the data imported by the Ruby script becuase of key constraints.
Soooo, I am simply trying to run the ruby script from the c# app. It runs without error -- but it appears the ruby script is never being processed?
Also it never opens a new CMD window, which I would like it to do and then parse the txt file -- Not sure if this is possible? Or if it can show the ruby print statements in the current command window?
I have attempted a few variations of the following?
Thanks in advance!
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(@"ruby")
FileName = "cmd.exe";
Arguments = @"C:\\connextToDB.rb";
RedirectStandardInput = true;
RedirectStandardOutput = true;
UseShellExecute = false;
WindowStyle = ProcessWindowStyle.Normal;
CreateNoWindow = false;
System.Diagnostics.Process process = new System.Diagnostics.Process()
StartInfo = startInfo