--- layout: tutorials permalink: /tutorials/using-jekyll-with-bundler/ title: Using Jekyll with Bundler --- > Bundler provides a consistent environment for Ruby projects by tracking and > installing the exact gems and versions that are needed. [Bundler](https://bundler.io) can be a great tool to use with Jekyll. Because it tracks dependencies on a per-project basis, it is particularly useful if you need to run different versions of Jekyll in different projects, or if you don't want to install Jekyll at the system or user level. This tutorial will show you how to create a new Jekyll project using Bundler and without installing Jekyll outside the project. ## Before You Begin To complete this tutorial, you'll need to have [Ruby](https://www.ruby-lang.org/en/) and [Bundler](https://bundler.io/) installed. You can find the installation instructions on their websites. ## Initialize Bundler The first thing to do is create a new directory for your project and run `bundle init`. This creates a new Bundler project (by creating an empty Gemfile). ```sh mkdir my-jekyll-website cd my-jekyll-website bundle init ``` ## Configure Bundler This step is optional, but encouraged. We're going to configure Bundler to install gems in the `./vendor/bundle/` project subdirectory. This allows us to install our dependencies in an isolated environment, ensuring they don't conflict with other gems on your system. If you skip this step, Bundler will install your dependencies globally on your system. ```sh bundle install --path vendor/bundle ```
This step is only required once per project. Bundler saves your config in
./.bundle/config
, so future gems will be installed to the same
location.