# Syncing gems between computers

**URL:** <https://www.ruby-forum.com/t/syncing-gems-between-computers/116138>\
**Category:** Ruby\
**Created:** [October 2, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/syncing-gems-between-computers/116138 "2007-10-02T20:01:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebeard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/bbce88/32.png) [@ebeard](https://www.ruby-forum.com/u/ebeard)\
**Post date:** [October 2, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/syncing-gems-between-computers/116138/1 "2007-10-02T20:01:03Z")

</div>

Before I write my own capistrano task I was wondering how others sync  
gems from one computer to another? I want to be able to run a ruby  
program on multiple computers but not get bogged down in hand parsing  
the output from `gem list` on both computers to make sure it can run  
in both places. Thanks for any hints.

---

<div class="post-metadata">

**Author:** ![ebeard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/bbce88/32.png) [@ebeard](https://www.ruby-forum.com/u/ebeard)\
**Post date:** [October 2, 2007, 8:27pm UTC](https://www.ruby-forum.com/t/syncing-gems-between-computers/116138/2 "2007-10-02T20:27:24Z")

</div>

On 10/2/07, ebeard [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Before I write my own capistrano task I was wondering how others sync  
> gems from one computer to another? I want to be able to run a ruby  
> program on multiple computers but not get bogged down in hand parsing  
> the output from `gem list` on both computers to make sure it can run  
> in both places. Thanks for any hints.

I run  
rsync -av --delete source:/usr/lib/ruby/gems/1.8/cache/ target:  
/usr/lib/ruby/gems/1.8/cache

and then run the attached script. You won’t be able to use it ‘as is’  
(remove or replace references to mail\_exception, MailSender and the  
like, but you’ll get the idea.  
It let’s me update install and uninstall gems automatically.  
The only problem that I see are gems that need development packages  
that may not be installed on the target machine. I might need to  
create a ‘binary gem’ in those cases.

Cheers

Han H.
