." generated with Ronn/v0.7.3 ." github.com/rtomayko/ronn/tree/0.7.3 . .TH “BUNDLE-UPDATE” “1” “July 2014” “” “” . .SH “NAME” fBbundle-updatefR - Update your gems to the latest available versions . .SH “SYNOPSIS” fBbundle updatefR fI*gemsfR [--source=NAME] [--local] . .SH “DESCRIPTION” Update the gems specified (all gems, if none are specified), ignoring the previously installed gems specified in the fBGemfile.lockfR. In general, you should use bundle install(1) fIbundle-install.1.htmlfR to install the same exact gems and versions across machines. . .P You would use fBbundle updatefR to explicitly update the version of a gem. . .SH “OPTIONS” . .TP fB--source=<name>fR The name of a fB:gitfR or fB:pathfR source used in the Gemfile(5). For instance, with a fB:gitfR source of fBgithub.com/rails/rails.gitfR, you would call fBbundle update --source railsfR . .TP fB--localfR Do not attempt to fetch gems remotely and use the gem cache instead. . .SH “UPDATING ALL GEMS” If you run fBbundle updatefR with no parameters, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources. . .P Consider the following Gemfile(5): . .IP “” 4 . .nf
source “rubygems.org”
gem “rails”, “3.0.0.rc” gem “nokogiri” . .fi . .IP “” 0 . .P When you run bundle install(1) fIbundle-install.1.htmlfR the first time, bundler will resolve all of the dependencies, all the way down, and install what you need: . .IP “” 4 . .nf
Fetching source index for rubygems.org/ Installing rake (10.0.2) Installing abstract (1.0.0) Installing activesupport (3.0.0.rc) Installing builder (2.1.2) Installing i18n (0.4.1) Installing activemodel (3.0.0.rc) Installing erubis (2.6.6) Installing rack (1.2.1) Installing rack-mount (0.6.9) Installing rack-test (0.5.4) Installing tzinfo (0.3.22) Installing actionpack (3.0.0.rc) Installing mime-types (1.16) Installing polyglot (0.3.1) Installing treetop (1.4.8) Installing mail (2.2.5) Installing actionmailer (3.0.0.rc) Installing arel (0.4.0) Installing activerecord (3.0.0.rc) Installing activeresource (3.0.0.rc) Installing bundler (1.0.0.rc.3) Installing nokogiri (1.4.3.1) with native extensions Installing thor (0.14.0) Installing railties (3.0.0.rc) Installing rails (3.0.0.rc)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. . .fi . .IP “” 0 . .P As you can see, even though you have just two gems in the Gemfile(5), your application actually needs 25 different gems in order to run. Bundler remembers the exact versions it installed in fBGemfile.lockfR. The next time you run bundle install(1) fIbundle-install.1.htmlfR, bundler skips the dependency resolution and installs the same gems as it installed last time. . .P After checking in the fBGemfile.lockfR into version control and cloning it on another machine, running bundle install(1) fIbundle-install.1.htmlfR will fIstillfR install the gems that you installed last time. You don't need to worry that a new release of fBerubisfR or fBmailfR changes the gems you use. . .P However, from time to time, you might want to update the gems you are using to the newest versions that still match the gems in your Gemfile(5). . .P To do this, run fBbundle updatefR, which will ignore the fBGemfile.lockfR, and resolve all the dependencies again. Keep in mind that this process can result in a significantly different set of the 25 gems, based on the requirements of new gems that the gem authors released since the last time you ran fBbundle updatefR. . .SH “UPDATING A LIST OF GEMS” Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the gems that you specified locked to the versions in the fBGemfile.lockfR. . .P For instance, in the scenario above, imagine that fBnokogirifR releases version fB1.4.4fR, and you want to update it fIwithoutfR updating Rails and all of its dependencies. To do this, run fBbundle update nokogirifR. . .P Bundler will update fBnokogirifR and any of its dependencies, but leave alone Rails and its dependencies. . .SH “OVERLAPPING DEPENDENCIES” Sometimes, multiple gems declared in your Gemfile(5) are satisfied by the same second-level dependency. For instance, consider the case of fBthinfR and fBrack-perftools-profilerfR. . .IP “” 4 . .nf
source “rubygems.org”
gem “thin” gem “rack-perftools-profiler” . .fi . .IP “” 0 . .P The fBthinfR gem depends on fBrack >= 1.0fR, while fBrack-perftools-profilerfR depends on fBrack ~> 1.0fR. If you run bundle install, you get: . .IP “” 4 . .nf
Fetching source index for rubygems.org/ Installing daemons (1.1.0) Installing eventmachine (0.12.10) with native extensions Installing open4 (1.0.1) Installing perftools.rb (0.4.7) with native extensions Installing rack (1.2.1) Installing rack-perftools_profiler (0.0.2) Installing thin (1.2.7) with native extensions Using bundler (1.0.0.rc.3) . .fi . .IP “” 0 . .P In this case, the two gems have their own set of dependencies, but they share fBrackfR in common. If you run fBbundle update thinfR, bundler will update fBdaemonsfR, fBeventmachinefR and fBrackfR, which are dependencies of fBthinfR, but not fBopen4fR or fBperftools.rbfR, which are dependencies of fBrack-perftools_profilerfR. Note that fBbundle update thinfR will update fBrackfR even though it's fIalsofR a dependency of fBrack-perftools_profilerfR. . .P fBIn shortfR, when you update a gem using fBbundle updatefR, bundler will update all dependencies of that gem, including those that are also dependencies of another gem. . .P In this scenario, updating the fBthinfR version manually in the Gemfile(5), and then running bundle install(1) fIbundle-install.1.htmlfR will only update fBdaemonsfR and fBeventmachinefR, but not fBrackfR. For more information, see the fBCONSERVATIVE UPDATINGfR section of bundle install(1) fIbundle-install.1.htmlfR. . .SH “RECOMMENDED WORKFLOW” In general, when working with an application managed with bundler, you should use the following workflow: . .IP “(bu” 4 After you create your Gemfile(5) for the first time, run . .IP $ bundle install . .IP “(bu” 4 Check the resulting fBGemfile.lockfR into version control . .IP $ git add Gemfile.lock . .IP “(bu” 4 When checking out this repository on another development machine, run . .IP $ bundle install . .IP “(bu” 4 When checking out this repository on a deployment machine, run . .IP $ bundle install --deployment . .IP “(bu” 4 After changing the Gemfile(5) to reflect a new or update dependency, run . .IP $ bundle install . .IP “(bu” 4 Make sure to check the updated fBGemfile.lockfR into version control . .IP $ git add Gemfile.lock . .IP “(bu” 4 If bundle install(1) fIbundle-install.1.htmlfR reports a conflict, manually update the specific gems that you changed in the Gemfile(5) . .IP $ bundle update rails thin . .IP “(bu” 4 If you want to update all the gems to the latest possible versions that still match the gems listed in the Gemfile(5), run . .IP $ bundle update . .IP “” 0
Generated with the Darkfish Rdoc Generator 2.