Take a look at exerb...

Ruby Maniac wrote:
> I would like to run Ruby code from a ZIP file directly rather than
> extracting the contents of the ZIP into a folder and run from there.
> 
> I am familiar with the work done by this person:
> 
>  http://www.erikveen.dds.nl/tar2rubyscript/index.html
>  http://www.erikveen.dds.nl/distributingrubyapplications/index.html
> 
> However I find those techniques to be too limiting for my purposes.
> 
> Eventually I would want to be able to run Ruby code from an encrypted
> ZIP file as a Windows app - I don't care about Linux or Unix as there
> are methods for getting Windows apps running from Linux or Unix
> natively (see also WINE).
> 
> The work of erikveen (see above) is interesting only because that
> approach does not attempt to make the Ruby source code encrypted only
> to misdirect the novice user from the actual location of the source
> code while the app is running however if the user happens to go poking
> around their temp folder while the app is running they get to see the
> Ruby source and this is unacceptable to me.
> 
> I would have thought someone might have done this already however so
> far I have not been able to find that someone.
> 
> BTW - Python allows this already in version 2.5.1 aside from the being
> encrypted part.
> 
> 
>