# Creating a framework to wrap a gem

**URL:** <https://www.ruby-forum.com/t/creating-a-framework-to-wrap-a-gem/120136>\
**Category:** Ruby\
**Created:** [November 14, 2007, 1:51am UTC](https://www.ruby-forum.com/t/creating-a-framework-to-wrap-a-gem/120136 "2007-11-14T01:51:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 14, 2007, 1:51am UTC](https://www.ruby-forum.com/t/creating-a-framework-to-wrap-a-gem/120136/1 "2007-11-14T01:51:35Z")

</div>

Anyone know of a good way to wrap a rubygem into a framework for  
xcode? I wana take my custom gem, make it into a framework for use in  
a rubycocoa app

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 14, 2007, 3:04am UTC](https://www.ruby-forum.com/t/creating-a-framework-to-wrap-a-gem/120136/2 "2007-11-14T03:04:02Z")

</div>

On Nov 14, 2007 1:50 AM, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Anyone know of a good way to wrap a rubygem into a framework for  
> xcode? I wana take my custom gem, make it into a framework for use in  
> a rubycocoa app

You could add a new build phase in your framework project that copies  
your gem inside the framework bundle, for example in the Resources  
directory. Then, in your RubyCocoa app, during initialization, modify  
the GEM\_HOME environment variable to point inside the framework  
bundle, then simply require the gem.

Laurent
