On Fri, Dec 12, 2008 at 07:59:39AM +0900, Alex Fulton wrote:
> Hi, my sincerest apologies if this question has already been answered
> somewhere, but google didn't turn anything up...
> 
> I'm working on a small university research project which is trying to
> create a network weathermap by creating a large distributed P2P network
> of clients installed on ordinary users' home computers, and collecting
> data by running traces etc between the different peers.
> 
> We want to use a high-level language and GUI library for the interface,
> and FXRuby seems to be a good option for this, but, due to the sort of
> computers this client is going to be deployed on (home users,
> predominantly Windows, probably not tech-savvy and reluctant to make any
> changes to their systems), most of them will probably not have a Ruby
> interpreter installed. Rather than forcing people to download Ruby and
> Fox and install them themselves, in addition to installing our client,
> we would prefer to be able to bundle the Ruby interpreter and GUI
> libraries into our application (as dynamic libraries or something) and
> then write most of the program in C (the startup code, the
> communications layer, etc), and only have the user-interaction stuff
> written in Ruby.
> 
> So, is it possible to have a C program that invokes Ruby code via an
> interpreter library? I'm sure I've seen some apps do this with Python,
> but I'm not sure if it's possible with Ruby or not...

The 3 different ways to do this that I know of are:

 - Shoes          : http://shoooes.net/
 - rubyscript2exe : http://www.erikveen.dds.nl/rubyscript2exe/
 - Crate          : http://copiousfreetime.rubyforge.org/crate/

Of the 3, Shoes has the gui support, and is probably the easiest to get going
with.  Crate may work the best if you have other libraries to compile against
for your application to work.  

Disclaimer: I'm the author of crate.

enjoy,

-jeremy

-- 
========================================================================
 Jeremy Hinegardner                              jeremy / hinegardner.org