Clarify `bundle config` in Bundler tutorial (#8150)
Merge pull request 8150
This commit is contained in:
parent
18f04c61ad
commit
d0f5f0f199
|
@ -9,10 +9,24 @@ date: 2018-03-06 21:33:25 -0700
|
||||||
|
|
||||||
[Bundler](https://bundler.io) can be a great tool to use with Jekyll. Because it
|
[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
|
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
|
need to run different versions of Jekyll in different projects.
|
||||||
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
|
In addition, because it can (optionally) install dependencies in the project
|
||||||
outside the project.
|
folder, it can help you avoid permissions issues you might otherwise run into.
|
||||||
|
The usual way to use Jekyll is to install Jekyll to the system's default gem
|
||||||
|
installation directory and then run `jekyll new`. In this tutorial, we'll show
|
||||||
|
you how to create a new Jekyll project using Bundler and without installing gems
|
||||||
|
outside the project directory.
|
||||||
|
|
||||||
|
<div class="note info">
|
||||||
|
<h5>This is not the simplest way to start using Jekyll</h5>
|
||||||
|
<p>
|
||||||
|
This tutorial helps you get Jekyll set up using Bundler, and optionally
|
||||||
|
without any system-wide gem installations. If prefer installing the jekyll
|
||||||
|
command to your default gem installation directory, you might want the
|
||||||
|
<a href="{% link _docs/index.md %}">Quickstart</a>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
## Before You Begin
|
## Before You Begin
|
||||||
|
|
||||||
|
@ -32,16 +46,19 @@ cd my-jekyll-website
|
||||||
bundle init
|
bundle init
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configure Bundler
|
## Configure Bundler Install Path
|
||||||
|
|
||||||
|
This step is optional. In this step, we're going to configure Bundler to install
|
||||||
|
gems in the `./vendor/bundle/` project subdirectory. The advantage of doing this
|
||||||
|
is that bundler will install gems within your project folder instead of the
|
||||||
|
location used by `gem install`. This can help you avoid permissions errors you
|
||||||
|
might otherwise get during gem installation, depending how you installed Ruby.
|
||||||
|
If you skip this step, Bundler will install your dependencies to the location
|
||||||
|
used by `gem install`.
|
||||||
|
|
||||||
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
|
```sh
|
||||||
bundle config set path 'vendor/bundle'
|
bundle config set --local path 'vendor/bundle'
|
||||||
```
|
```
|
||||||
|
|
||||||
<div class="note info">
|
<div class="note info">
|
||||||
|
@ -57,7 +74,8 @@ bundle config set path 'vendor/bundle'
|
||||||
|
|
||||||
Now, we're going to use Bundler to add Jekyll as a dependency of our new
|
Now, we're going to use Bundler to add Jekyll as a dependency of our new
|
||||||
project. This command will add the Jekyll gem to our Gemfile and install it to
|
project. This command will add the Jekyll gem to our Gemfile and install it to
|
||||||
the `./vendor/bundle/` folder.
|
the `./vendor/bundle/` folder (or your default gem installation directory if you
|
||||||
|
didn't set a custom path).
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bundle add jekyll
|
bundle add jekyll
|
||||||
|
|
Loading…
Reference in New Issue