# Installation probelm: zsh: command not found: jekyll

**URL:** <https://talk.jekyllrb.com/t/installation-probelm-zsh-command-not-found-jekyll/4116>\
**Category:** Uncategorized\
**Created:** [March 23, 2020, 12:45pm UTC](https://talk.jekyllrb.com/t/installation-probelm-zsh-command-not-found-jekyll/4116 "2020-03-23T12:45:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![biographie](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@biographie](https://talk.jekyllrb.com/u/biographie)\
**Post date:** [March 23, 2020, 12:45pm UTC](https://talk.jekyllrb.com/t/installation-probelm-zsh-command-not-found-jekyll/4116/1 "2020-03-23T12:45:08Z")

</div>

I am having difficulty installing Jekyll. The gem gets is installed but when I issue jekyll serve i get zsh: command not found: jekyll

Would really appreciate it if somebody could help me out?

---

<div class="post-metadata">

**Author:** ![michaelbach](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelbach/32/2151_2.png) [@michaelbach](https://talk.jekyllrb.com/u/michaelbach)\
**Post date:** [March 24, 2020, 6:43am UTC](https://talk.jekyllrb.com/t/installation-probelm-zsh-command-not-found-jekyll/4116/2 "2020-03-24T06:43:29Z")

</div>

Have you tried  
`bundle exec jekyll` ?

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [March 28, 2020, 12:58pm UTC](https://talk.jekyllrb.com/t/installation-probelm-zsh-command-not-found-jekyll/4116/3 "2020-03-28T12:58:38Z")

</div>

I think the issue is that the Jekyll is installed in a gems location with in not in your PATH variable in your shell.

I recently went through setting up Ruby and Jekyll on macOS using ZSH. Here is what I arrived at.

## 1. Update config

Update your shell config - add this to your `.bashrc` (for Bash) or `.zshrc` (for ZSH). You might need a different ruby version but this is the latest for macOS at the moment.

```auto
export GEM_PATH="$HOME/.gem/ruby/2.6.0/bin"
export PATH="$GEM_PATH:$PATH"

```

Then reload your terminal or start a new tab.

## 2. Reinstall Jekyll

You might want to uninstall the current Jekyll to avoid confusion. Then install it as belw.

Install the **Jekyll** gem at the **user** level (i.e. not shared by all users and not in a specific project). By default, this will install to the `~/.gems` directory.

```auto
$ gem install --user-install jekyll

```

## 3. Run

Now run this from anywhere:

```auto
which jekyll

```

```auto
jekyll serve

```

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [March 28, 2020, 1:03pm UTC](https://talk.jekyllrb.com/t/installation-probelm-zsh-command-not-found-jekyll/4116/4 "2020-03-28T13:03:13Z")

</div>

Adding onto the answer by @michaelbach and assuming you want to try using [Bundler](https://bundler.io/)…

You can install Jekyll as a gem in your project and lock it down to a version. Then you never have to install Jekyll for your user.

## 1. Specify Jekyll in your `Gemfile`.

```auto
gem 'jekyll', '~> 3.8.5'

```

## 2. Install

```auto
bundle install --path vendor/bundle

```

## 3. Run

```auto
bundle exec jekyll

```

Note you can only run Jekyll from the root of this project and not for other projects.
