bundle-package - bundler-1.9.9 Documentation

." generated with Ronn/v0.7.3 ." github.com/rtomayko/ronn/tree/0.7.3 . .TH “BUNDLE-PACKAGE” “1” “May 2015” “” “” . .SH “NAME” fBbundle-packagefR - Package your needed fB.gemfR files into your application . .SH “SYNOPSIS” fBbundle packagefR . .SH “DESCRIPTION” Copy all of the fB.gemfR files needed to run the application into the fBvendor/cachefR directory. In the future, when running bundle install(1) fIbundle-install.1.htmlfR, use the gems in the cache in preference to the ones on fBrubygems.orgfR. . .SH “GIT AND PATH GEMS” Since Bundler 1.2, the fBbundle packagefR command can also package fB:gitfR and fB:pathfR dependencies besides .gem files. This needs to be explicitly enabled via the fB--allfR option. Once used, the fB--allfR option will be remembered. . .SH “SUPPORT FOR MULTIPLE PLATFORMS” When using gems that have different packages for different platforms, Bundler 1.8 and newer support caching of gems for other platforms in fBvendor/cachefR. This needs to be enabled via the fB--all-platformsfR option. This setting will be remembered in your local bundler configuration. . .SH “REMOTE FETCHING” By default, if you simply run bundle install(1) fIbundle-install.1.htmlfR after running bundle package(1) fIbundle-package.1.htmlfR, bundler will still connect to fBrubygems.orgfR to check whether a platform-specific gem exists for any of the gems in fBvendor/cachefR. . .P For instance, consider this Gemfile(5): . .IP “” 4 . .nf

source “rubygems.org”

gem “nokogiri” . .fi . .IP “” 0 . .P If you run fBbundle packagefR under C Ruby, bundler will retrieve the version of fBnokogirifR for the fB“ruby”fR platform. If you deploy to JRuby and run fBbundle installfR, bundler is forced to check to see whether a fB“java”fR platformed fBnokogirifR exists. . .P Even though the fBnokogirifR gem for the Ruby platform is fItechnicallyfR acceptable on JRuby, it actually has a C extension that does not run on JRuby. As a result, bundler will, by default, still connect to fBrubygems.orgfR to check whether it has a version of one of your gems more specific to your platform. . .P This problem is also not just limited to the fB“java”fR platform. A similar (common) problem can happen when developing on Windows and deploying to Linux, or even when developing on OSX and deploying to Linux. . .P If you know for sure that the gems packaged in fBvendor/cachefR are appropriate for the platform you are on, you can run fBbundle install --localfR to skip checking for more appropriate gems, and just use the ones in fBvendor/cachefR. . .P One way to be sure that you have the right platformed versions of all your gems is to run fBbundle packagefR on an identical machine and check in the gems. For instance, you can run fBbundle packagefR on an identical staging box during your staging process, and check in the fBvendor/cachefR before deploying to production.