Last Updated: February 25, 2016
·
862
· hatchan

Use bundle package before deployment

Before deploying a Ruby application, you can use bundle package to package all .gem files in the vendor/cache folder.

bundle package

If you deploy your application to your server and you include the vendor/cache folder. Then bundle install will use the gems specified in the vendor/cache file, instead of downloading the gems from rubygems.org, git repositories, etc.

This can be handy to remove a dependency on rubygems.org during deployment (though there will still be some calls to rubygems.org, see the man pages). Also if deploying to multiple servers, you only have to download the .gem files once, not on every server.

More information: