See also my Install Ruby and Bundler gist.

CLI commands using the gem command. Requires Ruby to be installed.

Note that you might already have Bundler installed with your system Ruby. You may want to upgrade root’s Bundler, or install a user Bundler.

Install

Install for current user. If you omit the flag, you might get a permissions error.

$ gem install bundler --user-install

Install as root user - at /usr/bin/bundler.

$ sudo gem install bundler 

Alternatively, set the permissions of this directory to be available for any user to install to, then install without sudo, as covered in the gist.

Upgrade

Upgrade for user.

$ gem update bundler --user-install

Upgrade shared Bundler.

$ sudo gem update bundler