#7
May 11, 2009

Embedding MacRuby

At some point you're going to want to distribute your MacRuby application to folks who may not have MacRuby installed. This screencast shows you how to build a self-contained MacRuby application.
Tags: macruby
QuickTime (23 MB, 6:17) | iPhone/iPod (7.3 MB, 6:17)

RSS Feed for Screencast Comments 6 comments

1. Matt Aimonetti on May 11, 2009 at 13:43

Thanks a lot for yet another free MacRuby screencast.


2. Geoffrey Grosenbach on May 11, 2009 at 14:14

Very useful!

Another thing I did was to have the load path directive look for the frameworks directory so either target will build whether or not MacRuby has been bundled:

http://gist.github.com/110189


3. Mike Clark on May 11, 2009 at 14:21

Geoffrey: Ah, thanks, that's a good catch!

I probably should have mentioned that you can just copy the MacRuby run script into the main target and make it the final build phase. That means you only have one target to manage, but could be less flexible depending on how you plan to distribute the app.


4. Reborg on May 28, 2009 at 21:36

Mike, thanks a lot for these high quality free screencasts. Unfortunately for any non trivial application that makes use of the standard library, the embedding doesn't work. For example I tried to require yaml that is dependent on the stringio.bundle. The bundle still refers to MacRuby in /Library/Frameworks. Maybe I'm missing something, but I couldn't distribute my little app to friends without MacRuby installed.


5. Mike Clark on Jun 24, 2009 at 15:24

Reborg:

That sounds like a problem specific to the yaml library and its use of stringio.bundle. I've been able to use other standard Ruby libraries. Hopefully a future version of MacRuby will smooth this out.

Thanks for the heads-up, though!

Mike


6. Reborg on Aug 04, 2009 at 13:26

In the meanwhile, here's a workaround: http://reborg.tumblr.com/post/155619150/embedding-macruby

Thanks again

Add a Comment

(SKIP THIS ONE)

(not published)

(use pastie or gist for code)