The commandline tool I trying to call basically converts a file to another format.
I'm following along using this [tutorial][1] but am running into trouble. I keep getting invalid multibyte char (UTF-8) (SyntaxError)
I'm just dumping my commandline tool (made using C) in the bin and am trying to get it to work. Could someone shed some light on how I can get this working?
The error you are getting is related to UTF-8 encoding, which is the default encoding in ruby-2.x so I'm assuming you're using 1.8 or 1.9 and you should consider upgrading.
Try adding the following lines to the top of your script:
Let us know if it works and have a look at this thread for more.
EDIT: Now I understood what you want to do. Take a look here for an example file which sits at the
bin/directory. You can put your executable file to another directory likedata/for example, and call through ruby:Okay try now. This should work with multiple files also, like
prog file1.doc file2.doc ...