# Re: 'system' and windows and an external program

**URL:** <https://www.ruby-forum.com/t/re-system-and-windows-and-an-external-program/100908>\
**Category:** Ruby\
**Created:** [August 1, 2006, 10:26pm UTC](https://www.ruby-forum.com/t/re-system-and-windows-and-an-external-program/100908 "2006-08-01T22:26:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 1, 2006, 10:26pm UTC](https://www.ruby-forum.com/t/re-system-and-windows-and-an-external-program/100908/1 "2006-08-01T22:26:36Z")

</div>

Dear Ara,

thanks for responding.

> perhaps? eg does your pathname have two extensions?

No, I’ve tried that, but actually filename is now “mout.tex”. I  
wouldn’t  
understand why an  
extension should be the problem if the first two commands work - they  
act on the same file, or nearly …  
The system should execute

latex mout.tex

to interpret the Latex commands and produce a ‘.dvi’ file

dvips mout

to create a ‘.ps’ from this file, and finally

gsview32 mout.ps

to show the output.  
For the first two commands, there is no output in a special window  
though -  
I use Ruby from Scite and get its output in a subwindow of Scite, but  
opening an external application seems to require some trick which I  
don’t  
get .  
It’s also not the case that Postscript is opened and closed after 5  
msec,  
as this is the last command in my script. ☹

Best regards,

AXel

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 1, 2006, 10:37pm UTC](https://www.ruby-forum.com/t/re-system-and-windows-and-an-external-program/100908/2 "2006-08-01T22:37:49Z")

</div>

On Wed, 2 Aug 2006 removed\_email\_address@domain.invalid wrote:

> The system should execute
> 
> AXel  
> just to eliminate scite as the cause of the problem cd into the  
> directory  
> containing the files, start irb, then do

system ‘gsview32 mout.ps’

if that works then also try

ruby -e" system ‘gsview32 mout.ps’ "

(assuming mout.ps exists of course)

my hunch is that it should work. if it doesn’t then i would guess that  
‘system cmd’ is missing some env vars you have set elsewhere somehow.

regards.

-a
