# Site build unsuccessful

**URL:** <https://talk.jekyllrb.com/t/site-build-unsuccessful/2555>\
**Category:** Help\
**Created:** [January 29, 2019, 5:56am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555 "2019-01-29T05:56:43Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wayfarer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/wayfarer/32/1401_2.png) [@Wayfarer](https://talk.jekyllrb.com/u/Wayfarer)\
**Post date:** [January 29, 2019, 5:56am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/1 "2019-01-29T05:56:43Z")

</div>

Mac OSX Mojave, Ruby v 2.5.3, Bundler v 1.17.2. Homebrew installed.

This is a noob question but can’t make progress. I’m wanting to run a site of my local machine (which I was doing previously without problems.)

I cloned an existing jekyll site to my desktop and then entered `bundle exec jekyll build`. Got the error message ‘no gemfile’ so I followed the instructions on the jekyll page to install gems etc.

If I run Jekyll Build I get:  
Liquid Exception: Could not locate the included file ‘links.html’ in any of ["/Users/jonathanshearman/Desktop/recover/January/\_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site source. in /Users/jonathanshearman/Desktop/recover/January/\_posts/2015-04-12-test-post-last-year.md  
jekyll 3.8.5 | Error: Could not locate the included file ‘links.html’

But the file is not missing.

If I run bundle exec jekyll build, I get

```
bundler: failed to load command: jekyll (/usr/local/lib/ruby/gems/2.5.0/bin/jekyll)

```

Gem::Exception: can’t find executable jekyll for gem jekyll. jekyll is not currently included in the bundle, perhaps you meant to add it to your Gemfile?  
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/rubygems\_integration.rb:462:in `block in replace_bin_path' /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/rubygems_integration.rb:482:in`block in replace\_bin\_path’  
/usr/local/lib/ruby/gems/2.5.0/bin/jekyll:23:in `\<top (required)\>’

any guidance appreciated

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [January 29, 2019, 12:04pm UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/2 "2019-01-29T12:04:46Z")

</div>

_The easiest way someone can help you is if you can give them a link to your fork if it is a public repository._

Nevertheless, let us make do with what’s currently available.

From the error messages, it looks like your site doesn’t have a `Gemfile`.  
When there is no Gemfile, you **can’t use `bundle exec`**.  
If you have a Gemfile, ensure that you’ve either of the following listed in it:

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

# **or** if you're deploying via GitHub Pages
gem 'github-pages'

```

The other error is that **Jekyll cannot find an include named `links.html`**. This error occurs when Jekyll can’t find _`_includes/links.html`_ or another file the include itself is including…  
Note:

- Included file should not be a symlink.
- `_includes/link.html` is relative to the site’s source. If you override default source, the include has to change path accordingly.

---

<div class="post-metadata">

**Author:** ![Wayfarer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/wayfarer/32/1401_2.png) [@Wayfarer](https://talk.jekyllrb.com/u/Wayfarer)\
**Post date:** [January 29, 2019, 10:17pm UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/3 "2019-01-29T22:17:06Z")

</div>

> [@ashmaroli](#):
>
> The easiest way someone can help you is if you can give them a link to your fork if it is a public repository.

Sure- [GitHub - Texterity/January: This repo is for private training on Jekyll-Git-Atom-Markdown](https://github.com/Texterity/January.git). It’s visible at [https://docs.texterity.com.au/](https://docs.texterity.com.au/).

It’s a sandbox - I’m using a template to learn Jekyll-Markdown-Git. It builds fine on GitHub pages (as can be seen), but I was trying to run it locally, as I had been doing previously. So I cloned the repo using GitHub Desktop, navigated to the directory, and entered `bundle exec jekyll serve`. That was when I got the error message ‘no gemfile’. Went back and followed the instructions on Jekyll on installing gems and tried again.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [January 30, 2019, 12:23am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/4 "2019-01-30T00:23:44Z")

</div>

so its still not working?

did you try making a gemfile?

what happens if you just run `jekyll build`? bundler is recommended but not required. Bundler helps keep different gems in sync between different installations so you get the same behavior. I don’t use it.

[ah - I see thats where you get the other error]

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [January 30, 2019, 12:29am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/5 "2019-01-30T00:29:42Z")

</div>

are you trying to run the site in the Docs folder?

it almost looks like a jekyll site in the January folder but not quite.

---

<div class="post-metadata">

**Author:** ![Wayfarer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/wayfarer/32/1401_2.png) [@Wayfarer](https://talk.jekyllrb.com/u/Wayfarer)\
**Post date:** [January 30, 2019, 12:38am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/6 "2019-01-30T00:38:38Z")

</div>

Trying again, getting:

`Sirius:January jonathanshearman$ bundle exec jekyll build bundler: failed to load command: jekyll (/usr/local/lib/ruby/gems/2.5.0/bin/jekyll) Gem::Exception: can't find executable jekyll for gem jekyll. jekyll is not currently included in the bundle, perhaps you meant to add it to your Gemfile? /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/rubygems_integration.rb:462:in`block in replace\_bin\_path’  
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/rubygems\_integration.rb:482:in `block in replace_bin_path' /usr/local/lib/ruby/gems/2.5.0/bin/jekyll:23:in`\<top (required)\>’  
`

---

<div class="post-metadata">

**Author:** ![Wayfarer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/wayfarer/32/1401_2.png) [@Wayfarer](https://talk.jekyllrb.com/u/Wayfarer)\
**Post date:** [January 30, 2019, 12:42am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/7 "2019-01-30T00:42:16Z")

</div>

On bundle install:

Sirius:January jonathanshearman$ ls

CNAME Gemfile Gemfile.lock \_config.yml \_posts docs

'Sirius:January jonathanshearman$ bundle install

The Gemfile specifies no dependencies

Bundle complete! 0 Gemfile dependencies, 1 gem now installed.

Use `bundle info [gemname]` to see where a bundled gem is installed.’

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [January 30, 2019, 2:42am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/8 "2019-01-30T02:42:52Z")

</div>

I took a look inside your repository.

The reason you’re getting the error with Bundler is because your top-level Gemfile has been made redundant by `./docs/Gemfile`.

There are two routes to resolve your issue:

- Plan A: Serving from the root directory:
  - **Move `./docs/Gemfile` and the lockfile to the root directory at `./` (Replace those files at root)**
  - Serve / Build your Jekyll Site from the root directory via:

```auto
bundle exec jekyll serve --source docs --destination docs/_site

```

- Plan B: Serving from the `docs` directory.
  - simply `cd` into your docs folder and build from there:

```auto
cd docs
bundle exec jekyll serve

```

---

<div class="post-metadata">

**Author:** ![Wayfarer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/wayfarer/32/1401_2.png) [@Wayfarer](https://talk.jekyllrb.com/u/Wayfarer)\
**Post date:** [January 30, 2019, 2:57am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/9 "2019-01-30T02:57:31Z")

</div>

> [@ashmaroli](#):
>
> simply `cd` into your docs folder and build from there:

Solved! Thanks a million.

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [January 30, 2019, 3:17am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/10 "2019-01-30T03:17:04Z")

</div>

@Wayfarer I saw one thorn in your repo. As you were experimenting with your site, you ran a **wrong** command:

```auto
jekyll new .--force

```

The correct command is `jekyll new . --force` (whitespace matters)  
**Nevertheless, do not try that on your site since the correct command will delete your existing site.**

You can safely delete the `./.--force` directory from your repo. It is not needed and will only confuse new users of your sandbox.

---

<div class="post-metadata">

**Author:** ![Wayfarer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/wayfarer/32/1401_2.png) [@Wayfarer](https://talk.jekyllrb.com/u/Wayfarer)\
**Post date:** [January 30, 2019, 3:23am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/11 "2019-01-30T03:23:39Z")

</div>

Well, I’m the only user, and it surely confused me!

I’m creating a real site based on this template, but trying out things in the sandbox before committing to the real site. But, thus warned, I will delete that ‘thorn’ from my sandbox, just to keep things neat and tidy.

---

<div class="post-metadata">

**Author:** ![Wayfarer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/wayfarer/32/1401_2.png) [@Wayfarer](https://talk.jekyllrb.com/u/Wayfarer)\
**Post date:** [January 30, 2019, 3:33am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/12 "2019-01-30T03:33:21Z")

</div>

What I was trying to accomplish by running the site locally, was to use the locally-hosted version for staging, so as not having to push numbers of tiny edits out to the live site while in the edit process.

So the idea is, open the local version in Atom and save changes as you go - you review them on the locally-run version, and then push them out to GitHub when you’ve got a decent bunch of changes. Does that make sense?

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [January 30, 2019, 3:37am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/13 "2019-01-30T03:37:29Z")

</div>

Yes, that’s exactly how _most of us_ develop our Jekyll sites. 😉

---

<div class="post-metadata">

**Author:** ![Wayfarer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/wayfarer/32/1401_2.png) [@Wayfarer](https://talk.jekyllrb.com/u/Wayfarer)\
**Post date:** [January 30, 2019, 4:13am UTC](https://talk.jekyllrb.com/t/site-build-unsuccessful/2555/14 "2019-01-30T04:13:11Z")

</div>

Terrific! So I’m on the right track. Thanks for your input and advice, this forum is a great resource.
