# Export all gems to app\_dir/vendor

**URL:** <https://www.ruby-forum.com/t/export-all-gems-to-app-dir-vendor/178972>\
**Category:** Rails\
**Created:** [November 14, 2009, 3:07pm UTC](https://www.ruby-forum.com/t/export-all-gems-to-app-dir-vendor/178972 "2009-11-14T15:07:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![penguinjr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b2d939/32.png) [@penguinjr](https://www.ruby-forum.com/u/penguinjr)\
**Post date:** [November 14, 2009, 3:07pm UTC](https://www.ruby-forum.com/t/export-all-gems-to-app-dir-vendor/178972/1 "2009-11-14T15:07:13Z")

</div>

Hi!

I’m looking form the method to export all gems of the development to  
app\_dir/vendor directory for setting up the production server.

I saw the cmd

rake -T | grep freeze

And i used

rake rails:freeze:gems but, it don’t put all gems at app\_dir/vendor  
only:

activesupport  
activerecord  
actionpack  
actionmailer  
activesource  
rails

I want put at vendor too RedCloth, mysql, metric\_fu, etc… and the rest  
of the gems that this proyect use (and are installed, i can see using  
‘gem list’).

I saw [http://gemsonrails.rubyforge.org/](http://gemsonrails.rubyforge.org/) but i have idea if is necesary  
for that or not.

PD. I use rails 2.2.2 version

I’ll appreciate any idea.  
Thank you.

---

<div class="post-metadata">

**Author:** ![penguinjr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b2d939/32.png) [@penguinjr](https://www.ruby-forum.com/u/penguinjr)\
**Post date:** [November 14, 2009, 4:54pm UTC](https://www.ruby-forum.com/t/export-all-gems-to-app-dir-vendor/178972/2 "2009-11-14T16:54:20Z")

</div>

Penguin Junior wrote:

> Hi!
> 
> I’m looking form the method to export all gems of the development to  
> app\_dir/vendor directory for setting up the production server.
> 
> I saw the cmd
> 
> rake -T | grep freeze
> 
> And i used
> 
> rake rails:freeze:gems but, it don’t put all gems at app\_dir/vendor  
> only:
> 
> activesupport  
> activerecord  
> actionpack  
> actionmailer  
> activesource  
> rails

Right. That command only freezes the Rails gems.

> I want put at vendor too RedCloth, mysql, metric\_fu, etc… and the rest  
> of the gems that this proyect use (and are installed, i can see using  
> ‘gem list’).

rake gems:unpack GEM=name

If that isn’t in your Rake tasks, you may need to install gemsonrails.

> I saw [http://gemsonrails.rubyforge.org/](http://gemsonrails.rubyforge.org/) but i have idea if is necesary  
> for that or not.
> 
> PD. I use rails 2.2.2 version
> 
> I’ll appreciate any idea.  
> Thank you.

## Best,

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

---

<div class="post-metadata">

**Author:** ![penguinjr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b2d939/32.png) [@penguinjr](https://www.ruby-forum.com/u/penguinjr)\
**Post date:** [November 14, 2009, 5:13pm UTC](https://www.ruby-forum.com/t/export-all-gems-to-app-dir-vendor/178972/3 "2009-11-14T17:13:22Z")

</div>

Marnen Laibow-Koser wrote:

> If that isn’t in your Rake tasks, you may need to install gemsonrails.
> 
> > I saw [http://gemsonrails.rubyforge.org/](http://gemsonrails.rubyforge.org/) but i have idea if is necesary  
> > for that or not.
> > 
> > PD. I use rails 2.2.2 version
> > 
> > I’ll appreciate any idea.  
> > Thank you.
> 
> ## Best,
> 
> Marnen Laibow-Koser  
> [http://www.marnen.org](http://www.marnen.org)  
> removed\_email\_address@domain.invalid

If i put gems at vendor and after i change the app to production server  
from deploy server, and in the production server i don’t have that gems  
(gem list), Will gem works without do ‘gem install XXX’?

---

<div class="post-metadata">

**Author:** ![penguinjr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b2d939/32.png) [@penguinjr](https://www.ruby-forum.com/u/penguinjr)\
**Post date:** [November 14, 2009, 5:43pm UTC](https://www.ruby-forum.com/t/export-all-gems-to-app-dir-vendor/178972/4 "2009-11-14T17:43:04Z")

</div>

I did this script

#!/bin/bash

for gem in $(sudo gem list --no-version)  
do  
rake gems:freeze GEM=$gem;  
done

And i get some messages with some gems:

“uninitialized constant Gem::Specification::PLATFORM\_CROSS\_TARGETS  
Unpacked rmagick 2.9.2 to ‘rmagick-2.9.2’  
(in /var/www/trunk)”

Maybe because are gem’s needed compilation?

I’m going to up to production server, i hope that’s work.
