Setting up a new machine for rails

I am wondering if there is an quick and easy way to set up a new
machine which duplicates the rails env of another machine. I have in
the course of last several months installed many gems and it would be
great if I didn’t have to make a list and re-install all the gems.

On a related matter… Is there a way to tie this into migrations? I
mean if I need a new gem is there any way I can get capistrano to
migrate my gems as well as my database schema changes?

Thanks.

On 12/5/06, Tim U. [email protected] wrote:

I am wondering if there is an quick and easy way to set up a new
machine which duplicates the rails env of another machine. I have in
the course of last several months installed many gems and it would be
great if I didn’t have to make a list and re-install all the gems.

#!/bin/sh

for x in gem list --local | grep '(' | sort | awk 'BEGIN { FS = " " } { print $1 }'; do
echo “gem install $x”
done


Greg D.
http://destiney.com/

for x in gem list --local | grep '(' | sort | awk 'BEGIN { FS = " " } { print $1 }'; do
echo “gem install $x”
done

Wow. Thanks. I would have to pipe this to a file and remove any
windows specific gems but that’s great.

On 12/7/06, Greg D. [email protected] wrote:

{ print $1 }'`; do
echo “gem install $x”
done

wouldnt you want something like:

echo “gem install $x -y”

to install all dependencies? I think it would also get stuck on the
multiple version menu that always seems to come up, wouldn’t it?

On 12/8/06, Rob S. [email protected] wrote:

wouldnt you want something like:

echo “gem install $x -y”

to install all dependencies?

It produces a list of all the gems installed, what dependencies?

I think it would also get stuck on the
multiple version menu that always seems to come up, wouldn’t it?

You would need to run it by hand, yes.


Greg D.
http://destiney.com/

On 12/8/06, Greg D. [email protected] wrote:

I think it would also get stuck on the
multiple version menu that always seems to come up, wouldn’t it?

You would need to run it by hand, yes.

I’ve had success eliminating the prompt by passing the version number,
like
this:

gem install -y mongrel --version 0.3.13.4


Scott B.
Electro Interactive, Inc.
Office: 813-333-5508