See Subcommands.

Install from Gemfile

See also gist of install instructions.

$ bundle config set --local path vendor/bundle
$ bundle install

Old style - just for reference. Donโ€™t use this. Bundler docs mark this as deprecated.

$ bundle install --path vendor/bundle
$ # On later runs you can just run:
$ bundle install

Install and add to Gemfile

$ bundle add GEM_NAME
$ bundle add jekyll

Install in group

Install a gem and add it to a group.

Here we set jekyll_plugins as the group on the CLI, which becomes :jekyll_plugins in the Gemfile.

$ bundle add jekyll-optional-front-matter -g jekyll_plugins

Line appended:

gem "jekyll-optional-front-matter", "~> 0.3.2", :group => :jekyll_plugins

But you may prefer to rewrite write it yourself like this:

group :jekyll_plugins do
  gem 'jekyll-optional-front-matter', '~> 0.3.2'
  # Other plugins...
end