I need to get Ruby on Rails (3.0.9) installed onto a production server that doesn’t have internet access. Ruby itself is already installed, and is the same version as on my development machine. But there are no gems installed at the moment.
Running gem list -d on my development machine, I can see a pile of gems installed at /usr/lib/ruby/gems/1.8/gems
Basically, I am wondering whether it is possible so simply tar up the gems directory on the development machine, copy to production, and unpack it into the corresponding directory. I would simply try it and see if it works, but I’m aware this is a production install, and I’d rather not be left with something that looks like it works, but doesn’t quite.
Is there a better option? e.g. copy these files to somewhere else that I set up as a gem repository?
Bundler offers this feature with bundle package.
Note that this doesn’t include gems with sources included via
:gitor:pathoptions.