Export all gems to app_dir/vendor

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/ 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.

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/ 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
[email protected]

Marnen Laibow-Koser wrote:

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

I saw 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
[email protected]

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’?

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.