Usering
Usering

Reputation: 143

How can I copy gems to another server?

I have a server, "server1", set up with with Ruby 1.8.7 and Rubygems 1.6.2, with several gems installed.

I want to replicate it on another server "server2" which has matching versions of Ruby and Rubygems. I FTP'ed the installed gem folders from server1 to server2 into the same paths.

Now, in server2 when I do:

gem list

no gems appear, although they were copied into the correct gem path.

Can anyone tell me whether this is a correct way to install gems, or whether there are better option rather than installing each gem on its own?

Upvotes: 5

Views: 4512

Answers (1)

the Tin Man
the Tin Man

Reputation: 160551

If you do gem env on server1 you should see a GEM PATHS: entry, followed by some directories. Those are what need to be duplicated.

Rubygems keeps track of the installed gems, but I don't remember exactly where. You should be able to get everything by doing the containing folders.

Upvotes: 5

Related Questions