# FXRuby and exerb.rb?

**URL:** <https://rubytalk.org/t/fxruby-and-exerb-rb/1793>\
**Category:** ruby-talk\
**Created:** [17 September 2002 06:41 UTC](https://rubytalk.org/t/fxruby-and-exerb-rb/1793 "2002-09-17T06:41:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coma\_Killen](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Coma\_Killen](https://rubytalk.org/u/Coma_Killen)\
**Post date:** [17 September 2002 06:41 UTC](https://rubytalk.org/t/fxruby-and-exerb-rb/1793/1 "2002-09-17T06:41:37Z")

</div>

Hi,

Anyone know if FXRuby apps can be packed up to a single exe with  
exerb.rb so that they can execute stand-alone (ie without the need for  
cygwin.dll etc)?

Anyone done this and made it work? Any special steps necessary?

Regards,

Karsten

> **···**
>
> –  
> [http://fastmail.fm](http://fastmail.fm) - The way an email service should be

---

<div class="post-metadata">

**Author:** ![Dossy](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dossy](https://rubytalk.org/u/Dossy)\
**Post date:** [17 September 2002 12:17 UTC](https://rubytalk.org/t/fxruby-and-exerb-rb/1793/2 "2002-09-17T12:17:26Z")

</div>

Heh! Just yesterday (literally) I started using exerb.rb – and I’m  
/loving/ it! …

My first thought was “what would it take to exerb.rb a FXRuby app”  
and it got me thinking …

If you figure out how to do it, please post your experience to the list.  
If I do it first, I’ll do the same.

Otherwise, maybe someone else has already beaten us to it.

Now, if only exerb.rb didn’t create such /large/ executables. Heh.  
Too bad the core itself is like 700K in size.

– Dossy

> **···**
>
> On 2002.09.17, coma\_killen@fastmail.fm [coma\_killen@fastmail.fm](mailto:coma_killen@fastmail.fm) wrote:
> 
> > Anyone know if FXRuby apps can be packed up to a single exe with  
> > exerb.rb so that they can execute stand-alone (ie without the need for  
> > cygwin.dll etc)?
> > 
> > Anyone done this and made it work? Any special steps necessary?
> 
> –  
> Dossy Shiobara mail: [dossy@panoptic.com](mailto:dossy@panoptic.com)  
> Panoptic Computer Network web: [http://www.panoptic.com/](http://www.panoptic.com/)  
> “He realized the fastest way to change is to laugh at your own  
> folly – then you can let go and quickly move on.” (p. 70)

---

<div class="post-metadata">

**Author:** ![Lyle\_Johnson6](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@Lyle\_Johnson6](https://rubytalk.org/u/Lyle_Johnson6)\
**Post date:** [17 September 2002 16:27 UTC](https://rubytalk.org/t/fxruby-and-exerb-rb/1793/3 "2002-09-17T16:27:53Z")

</div>

coma\_killen@fastmail.fm wrote:

> Anyone know if FXRuby apps can be packed up to a single exe with  
> exerb.rb so that they can execute stand-alone (ie without the need for  
> cygwin.dll etc)?
> 
> Anyone done this and made it work? Any special steps necessary?

I don’t think it’s going to work as-is with the current version of  
FXRuby because during the FXRuby module initialization I call the C  
function rb\_f\_require() directly in a few places. Part of the magic of  
“exerb” is that he overrides the built-in “require” method to look  
elsewhere (in the executable), but since I call rb\_f\_require() directly  
it doesn’t take advantage of this hook.

What I will try for the next FXRuby release is to replace my direct  
calls to rb\_f\_require() with something that mimics a “require” from the  
Ruby interpreter (e.g. using eval or something). This should work. If it  
does, I’ll also provide a HOWTO and a list of all the files one might  
want to list in their RBC file.

Hope this helps,

Lyle

P.S. Yes, you will get a huge executable when you roll FXRuby into it 😉

---

<div class="post-metadata">

**Author:** ![Nobuyoshi\_Nakada](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nobuyoshi\_Nakada](https://rubytalk.org/u/Nobuyoshi_Nakada)\
**Post date:** [17 September 2002 16:55 UTC](https://rubytalk.org/t/fxruby-and-exerb-rb/1793/4 "2002-09-17T16:55:11Z")

</div>

Hi,

> **···**
>
> At Wed, 18 Sep 2002 01:27:53 +0900, Lyle Johnson wrote:
> 
> > > Anyone know if FXRuby apps can be packed up to a single exe with  
> > > exerb.rb so that they can execute stand-alone (ie without the need for  
> > > cygwin.dll etc)?  
> > > Anyone done this and made it work? Any special steps necessary?
> > 
> > I don’t think it’s going to work as-is with the current version of  
> > FXRuby because during the FXRuby module initialization I call the C  
> > function rb\_f\_require() directly in a few places. Part of the magic of  
> > “exerb” is that he overrides the built-in “require” method to look  
> > elsewhere (in the executable), but since I call rb\_f\_require()  
> > directly it doesn’t take advantage of this hook.
> 
> Recent exerb has a trick for rb\_require(), but none for  
> rb\_f\_require(). I guess it would be possible.
> 
> –  
> Nobu Nakada

---

<div class="post-metadata">

**Author:** ![Alan\_Chen2](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Alan\_Chen2](https://rubytalk.org/u/Alan_Chen2)\
**Post date:** [17 September 2002 17:14 UTC](https://rubytalk.org/t/fxruby-and-exerb-rb/1793/5 "2002-09-17T17:14:11Z")

</div>

I’ve been told that the CVS version of exerb fixes this with some  
magic playing with overriding the rb\_f\_require symbol. Even with that  
however, I’m having problems with trying to get FXruby working with  
exerb. However, I haven’t looked at it for several weeks, there may be  
more CVS progress.

- alan

> **···**
>
> On Wed, Sep 18, 2002 at 01:27:53AM +0900, Lyle Johnson wrote:
> 
> > coma\_killen@fastmail.fm wrote:
> > 
> > > Anyone know if FXRuby apps can be packed up to a single exe with  
> > > exerb.rb so that they can execute stand-alone (ie without the need for  
> > > cygwin.dll etc)?
> > > 
> > > Anyone done this and made it work? Any special steps necessary?
> > 
> > I don’t think it’s going to work as-is with the current version of  
> > FXRuby because during the FXRuby module initialization I call the C  
> > function rb\_f\_require() directly in a few places. Part of the magic of  
> > “exerb” is that he overrides the built-in “require” method to look  
> > elsewhere (in the executable), but since I call rb\_f\_require() directly  
> > it doesn’t take advantage of this hook.
> > 
> > What I will try for the next FXRuby release is to replace my direct  
> > calls to rb\_f\_require() with something that mimics a “require” from the  
> > Ruby interpreter (e.g. using eval or something). This should work. If it  
> > does, I’ll also provide a HOWTO and a list of all the files one might  
> > want to list in their RBC file.
> > 
> > Hope this helps,
> > 
> > Lyle
> > 
> > P.S. Yes, you will get a huge executable when you roll FXRuby into it 😉
> 
> –  
> Alan Chen  
> Digikata LLC  
> [http://digikata.com](http://digikata.com)

---

<div class="post-metadata">

**Author:** ![Lyle\_Johnson6](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@Lyle\_Johnson6](https://rubytalk.org/u/Lyle_Johnson6)\
**Post date:** [17 September 2002 20:28 UTC](https://rubytalk.org/t/fxruby-and-exerb-rb/1793/6 "2002-09-17T20:28:18Z")

</div>

Actually, I was mistaken: My code was calling rb\_require() and not  
rb\_f\_require(). But I was also testing with the latest official release  
of exerb (exerb-2.0.0) and not the CVS version, so I’ll be sure to try  
with the CVS version instead.

> **···**
>
> [nobu.nokada@softhome.net](mailto:nobu.nokada@softhome.net) wrote:
> 
> > Recent exerb has a trick for rb\_require(), but none for  
> > rb\_f\_require(). I guess it would be possible.
