# Having trouble with jekyll-sitemap

**URL:** <https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210>\
**Category:** Help\
**Created:** [February 26, 2017, 4:53am UTC](https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210 "2017-02-26T04:53:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![buzzyapyear](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/buzzyapyear/32/90_2.png) [@buzzyapyear](https://talk.jekyllrb.com/u/buzzyapyear)\
**Post date:** [February 26, 2017, 4:53am UTC](https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210/1 "2017-02-26T04:53:56Z")

</div>

Hello all,

I’m building a site I’m planning on hosting at [github.io](http://github.io) with Jekyll, and I’m trying to get jekyll-sitemap going.

I’m running into an issue where it’s broken because I’m on Jekyll 3.4.0 but it seems jekyll-sitemap is requiring Jekyll 3.3.1.

The error output (as well as chatter that I can find on stack overflow) says to try `bundle exec`, however my understanding is that this simply forces versions being required and I’d like to avoid downgrading Jekyll for the obvious reasons.

Wonder if any of you folks ever run into this, and if so did you solve the issue without downgrading Jekyll? Or perhaps I’m misunderstanding something here and you can better inform me? 🙂

Thanks guys… and below is the stack trace when trying to run `jekyll build`

```auto
⇒ jekyll build              
WARN: Unresolved specs during Gem::Specification.reset:
      listen (< 3.1, ~> 3.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Library/Ruby/Gems/2.0.0/gems/bundler-1.14.4/lib/bundler/runtime.rb:40:in `block in setup': You have already activated jekyll 3.4.0, but your Gemfile requires jekyll 3.3.1. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
	from /Library/Ruby/Gems/2.0.0/gems/bundler-1.14.4/lib/bundler/runtime.rb:25:in `map'
	from /Library/Ruby/Gems/2.0.0/gems/bundler-1.14.4/lib/bundler/runtime.rb:25:in `setup'
	from /Library/Ruby/Gems/2.0.0/gems/bundler-1.14.4/lib/bundler.rb:100:in `setup'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.4.0/lib/jekyll/plugin_manager.rb:36:in `require_from_bundler'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.4.0/exe/jekyll:9:in `<top (required)>'
	from /usr/bin/jekyll:22:in `load'
	from /usr/bin/jekyll:22:in `<main>'

```

### Update:

Removing jekyll-sitemap from the Gemfile results in the same error, I discovered, so the issue must be with `github-pages`. Here’s the new Gemfile for reference:

```auto
source "https://rubygems.org"

gem "github-pages", group: :jekyll_plugins

```

---

<div class="post-metadata">

**Author:** ![gynter](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/gynter/32/21_2.png) [@gynter](https://talk.jekyllrb.com/u/gynter)\
**Post date:** [February 26, 2017, 9:43am UTC](https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210/2 "2017-02-26T09:43:23Z")

</div>

Could You show us Your Gemfile?

---

<div class="post-metadata">

**Author:** ![buzzyapyear](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/buzzyapyear/32/90_2.png) [@buzzyapyear](https://talk.jekyllrb.com/u/buzzyapyear)\
**Post date:** [February 26, 2017, 3:27pm UTC](https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210/3 "2017-02-26T15:27:25Z")

</div>

Yes, sorry I should have included that.

```auto
source "https://rubygems.org"

gem "github-pages", group: :jekyll_plugins
gem "jekyll-sitemap" 

```

Thanks Gynter.

---

<div class="post-metadata">

**Author:** ![buzzyapyear](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/buzzyapyear/32/90_2.png) [@buzzyapyear](https://talk.jekyllrb.com/u/buzzyapyear)\
**Post date:** [February 26, 2017, 3:29pm UTC](https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210/4 "2017-02-26T15:29:50Z")

</div>

…then in \_config.yml

```auto
markdown: kramdown
exclude:
  - package.json
  - node_modules
  - gulpfile.js
  - bower.json
  - README.md
gems:
  - jekyll-sitemap

```

---

<div class="post-metadata">

**Author:** ![buzzyapyear](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/buzzyapyear/32/90_2.png) [@buzzyapyear](https://talk.jekyllrb.com/u/buzzyapyear)\
**Post date:** [February 26, 2017, 3:32pm UTC](https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210/5 "2017-02-26T15:32:31Z")

</div>

Actually, and now that I’ve gotten that for you, I realize that removing jekyll-sitemap still results in the same error, so the problem must be in `github-pages`.

---

<div class="post-metadata">

**Author:** ![gynter](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/gynter/32/21_2.png) [@gynter](https://talk.jekyllrb.com/u/gynter)\
**Post date:** [February 26, 2017, 3:45pm UTC](https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210/6 "2017-02-26T15:45:06Z")

</div>

Ah, now I see. [`github-pages`](https://rubygems.org/gems/github-pages) gem depends on Jekyll version 3.3.1 therefore You can’t use Jekyll 3.4.0 with github-pages gem. Check the runtime dependencies from the link I just posted. It shows the dependencies which github-pages will install/require.

---

<div class="post-metadata">

**Author:** ![buzzyapyear](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/buzzyapyear/32/90_2.png) [@buzzyapyear](https://talk.jekyllrb.com/u/buzzyapyear)\
**Post date:** [February 26, 2017, 4:10pm UTC](https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210/7 "2017-02-26T16:10:23Z")

</div>

Thank you Gynter, that explains it, I guess I’m out of luck if I want to stay on Jekyll 3.4. Appreciate the help.

---

<div class="post-metadata">

**Author:** ![gynter](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/gynter/32/21_2.png) [@gynter](https://talk.jekyllrb.com/u/gynter)\
**Post date:** [February 26, 2017, 4:20pm UTC](https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210/8 "2017-02-26T16:20:42Z")

</div>

If You want to use Jekyll 3.4.0 with github then You must build the web locally and commit the built page to master branch along with file `.nojekyll`. See [my repo](https://github.com/gynter/gynter.github.io) for this kind of solution. There’s two branches `source` and `master`. Latter one contains the locally built and commited to repo data.

---

<div class="post-metadata">

**Author:** ![buzzyapyear](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/buzzyapyear/32/90_2.png) [@buzzyapyear](https://talk.jekyllrb.com/u/buzzyapyear)\
**Post date:** [February 26, 2017, 4:26pm UTC](https://talk.jekyllrb.com/t/having-trouble-with-jekyll-sitemap/210/9 "2017-02-26T16:26:39Z")

</div>

Ah, I see. That really nullifies a lot of the benefit of using github pages, so I should definitely consider redoing this on Jekyll 3.3.1. I am building this site with the intention of less-technical users being able to easily maintain the content with the markdown files, and was imagining a situation where they didn’t _necessarily_ have to get the whole environment running.

Thanks for the excellent advice, I appreciate the link to your repo example.
