Matthew Williams wrote:
> I have the following line in a small app:
> 
> exec("charting/RequestByProject.jar",params[:name]')
> 
> When run in a UNIX environment it works fine.
> 
> However, moving it over to Windows and trying to run:
> exec("charting\RequestByProject.jar",params[:name]')
> 
> Returns nothing...  But if I jump to the Windows command line and run:
> RequestByProject.jar project
> 
> It runs fine.
> 
> Any thoughts why it's not executing from my Ruby code in Windows?


Did you try with system() or `` instead? Or maybe IO.
And tried File.exist? on it too, to see if the path was working?

Last but not least, maybe it wasn't in the path. But if it can be found,
it should even work on Windows using something like
result = `RequestByProject.jar #{params[:name]}`
and peeking at the result, and the error code

Just some thoughts :)
-- 
Posted via http://www.ruby-forum.com/.