Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between $Bundle install and $Bundle update

Could you tell me, whats the difference between:

$Bundle update 

and

$Bundle install 
like image 991
matDobek Avatar asked May 11 '13 09:05

matDobek


People also ask

Is bundle the same as bundle install?

The commands bundle & bundle install also have the same functionality. bundle uses Thor, and bundle 's default task is install .

What is a bundle install?

bundle install is a command we use to install the dependencies specified in your Gemfile.

What does gem update do?

Updating a Gem Without Modifying the Gemfile This command will update rack-cache and its dependencies to the latest version allowed by the Gemfile (in this case, the latest version available). It will not modify any other dependencies.

How do you update a gem to a specific version?

The correct way to update the version of a gem to a specific version is to specify the version you want in your Gemfile, then run bundle install . As for why your command line was failing, there is no -version option.

What is the install versus bundle feature?

The Install Versus Bundle feature describes the two modes, Install mode and Bundle mode and how to set the mode of operation.

Can I change the package configuration in the Switch bundle mode?

We recommend that you do not alter the packages.conf and .pkg files unless directed by a Cisco Technical Assistance Center (TAC) engineer. The Bundle mode uses monolithic Cisco IOS images to boot a switch. The Bundle mode consumes more memory than the Install mode because the packages are extracted from the bundle and copied to RAM.

How do I convert the mode of operation from install to bundle?

Perform the following steps to convert the mode of operation from Install mode to Bundle mode: Enables privileged EXEC mode. Enter your password if prompted. Verifies the mode of operation.

What is the difference between Switch bundle mode and standalone mode?

The Bundle mode uses monolithic Cisco IOS images to boot a switch. The Bundle mode consumes more memory than the Install mode because the packages are extracted from the bundle and copied to RAM. A standalone switch operates as the active switch .


2 Answers

bundle update and bundle install can both install the gems you specified in Gemfile but missing in gems.

But bundle update does one thing more to upgrade:

  1. If the gems specified in Gemfile don't have version, it will upgrade to whatever latest.
  2. If the gems specified in Gemfile have version controlled with ~>, it will upgrade to the latest at the final digit, the patch version.

    For example, if you have a gem in Gemfile

    'foo_gem', '~> 2.1.0' 

    bundle update will check if newer version of 2.1.x is available in cloud. Say your current version is 2.1.2 and what's latest in cloud is 2.1.5, it will install 2.1.5. But if 2.2.6 is the newest, it won't do anything.

Better practice in my opinion

  1. Always add version to critical gems like rails.

  2. Stick to bundle install(or bundle which is default to install) in most cases. Only do bundle update when it's really necessary and you are fully prepared for the result.

like image 53
Billy Chan Avatar answered Sep 19 '22 12:09

Billy Chan


Bundle Updates the gems specified (all gems, if none are specified), ignoring the previously installed gems specified in the Gemfile.lock. In general, you should use bundle install to install the same exact gems and versions across machines.

like image 21
Denny Mueller Avatar answered Sep 21 '22 12:09

Denny Mueller