This is just a general question about bundle install
and bundle update
and it's literally as simple as the title. Does bundle update
do bundle install
to the files that weren't installed beforehand?
In short, yes.
bundle update
will install the latest version of all gems listed in your gemfile, regardless of what you have in Gemfile.lock
. Eg if you were to add rails
to your Gemfile
without previously having run bundle install
bundle update would install the rails
gem.
To do this, run bundle update, which will ignore the Gemfile.lock, and resolve all the dependencies again
Running bundle update
does two things:
Update Gemfile.lock
to the latest versions available, using Gemfile
as the source of information for updating Gemfile.lock
.
Run bundle install
to make sure all these gems are present in your system.
So yes, if you add a gem to Gemfile
and then run bundle update
, it will install this new gem for you too.
Bundle Update will actually update the versions of the gems that you have bundled, see: http://bundler.io/man/bundle-update.1.html#NAME
Whereas Bundle Install will install the missing gems that were not previously installed, see: http://bundler.io/v1.13/man/bundle-install.1.html#NAME
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.