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:
Written by Benno van den Berg
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#