# REE & application frozen gems

**URL:** <https://www.ruby-forum.com/t/ree-application-frozen-gems/189684>\
**Category:** Rails\
**Created:** [June 5, 2010, 5:21am UTC](https://www.ruby-forum.com/t/ree-application-frozen-gems/189684 "2010-06-05T05:21:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pakothawade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ba9def/32.png) [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Post date:** [June 5, 2010, 5:21am UTC](https://www.ruby-forum.com/t/ree-application-frozen-gems/189684/1 "2010-06-05T05:21:06Z")

</div>

I have the following versions of ruby installed in my production env.

ubuntu ~ \> /usr/bin/ruby -v  
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86\_64-linux]

ubuntu ~ \> /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby -v  
ruby 1.8.7 (2009-12-24 patchlevel 248) [x86\_64-linux], MBARI 0x6770,  
Ruby Enterprise Edition 2010.01

I have frozen my gems in my application at /home/deploy/rails\_apps/  
my\_app/vendor

Do i need to reinstall all frozen gems of my application again in REE  
so that apache+passenger can pick it up?  
Where does apache look for gems? Wont it look into my vendor directory  
where i have frozen gems?

---

<div class="post-metadata">

**Author:** ![pakothawade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ba9def/32.png) [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Post date:** [June 5, 2010, 12:28pm UTC](https://www.ruby-forum.com/t/ree-application-frozen-gems/189684/2 "2010-06-05T12:28:25Z")

</div>

On Jun 5, 4:20 am, tispratik [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have frozen my gems in my application at /home/deploy/rails\_apps/  
> my\_app/vendor
> 
> Do i need to reinstall all frozen gems of my application again in REE  
> so that apache+passenger can pick it up?

No - that’s the whole point of freezing a gem into your app: you don’t  
have to install it anywhere because it’s bundled in with your app

Fred

---

<div class="post-metadata">

**Author:** ![pakothawade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ba9def/32.png) [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Post date:** [June 6, 2010, 6:24am UTC](https://www.ruby-forum.com/t/ree-application-frozen-gems/189684/3 "2010-06-06T06:24:46Z")

</div>

but the gems installed in the vendor directory are from my development  
environment.  
In my dev env, i dont have REE installed, so those gems were installed  
and frozen using the dev ruby compiler.

Shouldn’t i install the gems using REE and then freeze them in prod  
env?

---

<div class="post-metadata">

**Author:** ![pakothawade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ba9def/32.png) [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Post date:** [June 6, 2010, 7:37am UTC](https://www.ruby-forum.com/t/ree-application-frozen-gems/189684/4 "2010-06-06T07:37:27Z")

</div>

Pratik Khadloya wrote:

> but the gems installed in the vendor directory are from my development  
> environment.  
> In my dev env, i dont have REE installed, so those gems were installed  
> and frozen using the dev ruby compiler.

So what?

> Shouldn’t i install the gems using REE and then freeze them in prod  
> env?

No. There’s no need. Ruby is not compiled, so REE and MRI can run from  
the same source files.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![pakothawade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ba9def/32.png) [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Post date:** [June 6, 2010, 11:46am UTC](https://www.ruby-forum.com/t/ree-application-frozen-gems/189684/5 "2010-06-06T11:46:03Z")

</div>

On Jun 6, 6:37 am, Marnen Laibow-Koser [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Pratik Khadloya wrote:
> 
> > Shouldn’t i install the gems using REE and then freeze them in prod  
> > env?
> 
> No. There’s no need. Ruby is not compiled, so REE and MRI can run from  
> the same source files.

The only exception being if the gem had a native extension, in which  
case there’s a rake task to rebuild it ( rake gems:build off the top  
of my head)

Fred

---

<div class="post-metadata">

**Author:** ![pakothawade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ba9def/32.png) [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Post date:** [June 6, 2010, 6:00pm UTC](https://www.ruby-forum.com/t/ree-application-frozen-gems/189684/6 "2010-06-06T18:00:04Z")

</div>

Oh ok! I get it now, actually was confused by this post  
[http://blog.perplexedlabs.com/2009/01/13/installing-ruby-enterprise-edition-with-phusion-passenger/](http://blog.perplexedlabs.com/2009/01/13/installing-ruby-enterprise-edition-with-phusion-passenger/)  
where it says that you need to reinstall all gems and had  
will\_paginate in the list. I dont think will\_paginate requires any  
native extensions.

1. Ruby is not compiled.
2. Need to re-install only those gems which have a native extension.

1 more thing, do i need to set the path variable to point to /opt/ruby-  
enterprise-1.8.7-2010.01/bin/ruby instead of /usr/bin/ruby,  
so that any operations i do on my application residing at /home/deploy/  
rails\_apps/my\_app the REE is used?
