As I explained... Dan's idea of opening [executing] a file, can't work by passing a 'command' or even an exectable with following arguments, it will only work if you pass it a file.
So UI.openURL(full_url) opens that web-page in the default browser.
And UI.openURL('file:///'<<full_path_to_file) opens that file in its default application, so if it's a .txt file then Notepad opens it, if it's a .doc file then Word opens it and so on [for a PC at least].
If it's an 'executable' then it 'runs' - these kinds of file include .exe, .cmd, .bat, .vbs etc on a PC [.command on a MAC etc].
Some executables take arguments when they are run from a 'shell'/'console'/'terminal' - e.g. in a PC command-shell typing Notepad[.exe] opens that program with a new empty/untitled window; but Notepad "txt_file" would open that file if it exists, or if it doesn't exist it asks you if you want to make it...
BUT you CAN'T pass arguments with UI.openURL()
So
UI.openURL("Notepad.exe")
will open an instance of 'Notepad' [true]
UI.openURL("\"Notepad.exe\" \"path_to_my_txt_file\"")
will fail [false]
UI.openURL('file:///'<<"path_to_my_txt_file")
will open that existing txt file with Notepad [true] or it will fail [false] if that txt file doesn't exist.
Using system(commands) in Ruby should give similar results to typing the exact same text into a command-shell - hence Dan's advice to 'quote' arguments - because 'spaces' in file paths will be taken as the start of a new argument otherwise and mess you up... So using
system(system("\"Notepad.exe\" \"path_to_test.txt\"")) is the same as using the very same strings inside a command-shell... BUT this runs as part of the Ruby thread, and Ruby will wait for it to complete...
The way to pass arguments to an external executable, that runs independently of Ruby once it's started, is to run it as something like a .cmd/.bat [.command on MAC]. You can't avoid the startup black PC window [although you can reduce it to a flicker by having one .cmd file to start another main .cmd file, the first opens and closes almost instantaneously while the second then runs silently].
So you can write a temporary .cmd' file [etc] then use UI.openURL('file:///'<<path_to_cmd_file)
to run it [also changing directory briefly to the file's folder does allow you to 'open' it 'by name only'...]
If you use some other kinds of executables like .jar or .vbs these can be set to run 'silently' - however, passing arguments to them is then awkward [although you could 'write' a temporary .vbs file etc containing ALL of the info needed to complete things*, or perhaps use an .ini. file containing the data needed by the .jar to read in for that to do it's stuff; on a MAC you would use an AppleScript or equivalent].
*For a 'silent' VBS solution you would use something like this line of code that you 'puts' into a 'temp.vbs' file...
createobject("wscript.shell").RUN "java -jar \"full_path_to_Model2GCode.jar\" \"full_path_to_fileForJava\"", 0, False
Obviously you need to adjust it for you own full file paths/names etc...
Then in Ruby you'd use UI.openURL('file:///'<<"full_path_to_temp.vbs") to run it - and it then executes asynchronously, quite separate from Ruby...