ruby CD interfaces

D

daniel cremer

Hi,

I was just wondering has anyone been using ruby as an interface for
cd-roms? I thought I had seen it mentioned before but can't find it now.
I was thinking specifically of having ruby on the CD to run a local
webrick and using a browser interface (maybe an .hta), or perhaps to
even run fox from the CD.
What type of problems would one run into ? would this be reliable on
most windows machines ?

-Daniel
 
R

rcoder

This is exactly what I've been working on, and it's definitely doable.
The only real challenges are making sure you shut down the WEBrick
process appropriately; you have to do some slightly tricky stuff with
delaying both the closing of the server process and the browser window,
since WEBrick won't shut down while there are still persistent HTTP
connections lying around.

On Windows, the best solution I found was actually to use the win32ole
module to spawn an IE instance through OLE, and control it from the
server side. That way, you can have the server shut the browser down
when needed. For Linux, I do something similar using a forked child
process and the Mozilla command-line '-remote' interface.

Using an HTA wrapper around your content also works, though the only
real advantage I've found is the ability to "lock down" the window so
that it can't be resized, navigated using back/forward buttons, etc.

I'm going to try to get some of the general-purpose code (basically,
the "browser control" library, and some of the remote scripting
infrastructure) cleared for release under an open license, but I'm not
sure if the legal guys will go for it. I would be happy to answer
questions about places where you get stuck, though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,614
Members
45,289
Latest member
stfp04

Latest Threads

Top