# How to install github pages with jekyll

**URL:** <https://talk.jekyllrb.com/t/how-to-install-github-pages-with-jekyll/3510>\
**Category:** Uncategorized\
**Created:** [October 28, 2019, 9:24pm UTC](https://talk.jekyllrb.com/t/how-to-install-github-pages-with-jekyll/3510 "2019-10-28T21:24:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brando90](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/brando90/32/1902_2.png) [@brando90](https://talk.jekyllrb.com/u/brando90)\
**Post date:** [October 28, 2019, 9:24pm UTC](https://talk.jekyllrb.com/t/how-to-install-github-pages-with-jekyll/3510/1 "2019-10-28T21:24:43Z")

</div>

I was following the instructions here: [https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll#creating-your-site](https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll#creating-your-site)

and then I tried the commands but I get errors. It says

```auto
Update the gem "github-pages" line so that the line looks like this, 
replacing VERSION with the current dependency version for github-pages. 
For more information, see "Dependency versions" on the GitHub Pages site.

gem "github-pages", "~> VERSION", group: :jekyll_plugins

```

but I get the error:

```auto
$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Could not find gem 'github-pages (~> 3.8.5)' in any of the gem sources listed in your Gemfile.

```

when I use:

```auto
gem "github-pages", "~> 3.8.5", group: :jekyll_plugins

```

How do I fix this?

* * *

My gemfile:

```auto
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 4.0.0"
# gem "jekyll", "~> 3.8.5"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
gem "jekyll-athena"

# Seems this is needed to install a lot of subcommands, see: https://github.com/jekyll/jekyll-compose
gem 'jekyll-compose', group: [:jekyll_plugins]

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
#gem "github-pages", group: :jekyll_plugins
# gem "github-pages", "~> jekyll 3.8.5", group: :jekyll_plugins
gem "github-pages", "~> 3.8.5", group: :jekyll_plugins
#gem "jekyll", "~> 3.8.5"

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
  gem "tzinfo", "~> 1.2"
  gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform?

```

---

<div class="post-metadata">

**Author:** ![brando90](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/brando90/32/1902_2.png) [@brando90](https://talk.jekyllrb.com/u/brando90)\
**Post date:** [October 28, 2019, 9:41pm UTC](https://talk.jekyllrb.com/t/how-to-install-github-pages-with-jekyll/3510/2 "2019-10-28T21:41:10Z")

</div>

related:

> <https://stackoverflow.com/questions/58598699/what-is-the-format-for-the-dependency-version-to-install-github-pages-and-jekyll>

---

<div class="post-metadata">

**Author:** ![parkr](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/parkr/32/11_2.png) [@parkr](https://talk.jekyllrb.com/u/parkr)\
**Post date:** [October 28, 2019, 10:20pm UTC](https://talk.jekyllrb.com/t/how-to-install-github-pages-with-jekyll/3510/3 "2019-10-28T22:20:37Z")

</div>

Hi. The versions for the github-pages gem are different than for the Jekyll gem.

To look up a gem’s versions, use [RubyGems.org](http://RubyGems.org).

Here are the versions for github-pages: [https://rubygems.org/gems/github-pages](https://rubygems.org/gems/github-pages)

The latest version is 202, so you’d put:

```
gem "github-pages", "202"

```

With each new release (you can watch [the github/pages-gem repo for releases](https://github.com/github/pages-gem) if you want to be notified when new ones are released), just replace the `"202"` with the new version in quotes.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![brando90](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/brando90/32/1902_2.png) [@brando90](https://talk.jekyllrb.com/u/brando90)\
**Post date:** [October 28, 2019, 10:55pm UTC](https://talk.jekyllrb.com/t/how-to-install-github-pages-with-jekyll/3510/4 "2019-10-28T22:55:17Z")

</div>

Awesome! I think this nearly solves my issue. Now my Gemfile doesn’t work cuz it has the following error:

```auto
$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "jekyll-feed":
  In Gemfile:
    jekyll-feed (~> 0.12)

    github-pages (= 202) was resolved to 202, which depends on
      jekyll-feed (= 0.11.0)

```

my Gemfile is:

```auto
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 4.0.0"
# gem "jekyll", "~> 3.8.5"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
gem "jekyll-athena"

# Seems this is needed to install a lot of subcommands, see: https://github.com/jekyll/jekyll-compose
gem 'jekyll-compose', group: [:jekyll_plugins]

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# for jekyll 3.8.5
gem "github-pages", "202", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
  gem "tzinfo", "~> 1.2"
  gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform?

```

thanks for the help!

---

<div class="post-metadata">

**Author:** ![Louis](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/louis/32/2968_2.png) [@Louis](https://talk.jekyllrb.com/u/Louis)\
**Post date:** [November 25, 2020, 12:12am UTC](https://talk.jekyllrb.com/t/how-to-install-github-pages-with-jekyll/3510/5 "2020-11-25T00:12:48Z")

</div>

"Bundler could not find compatible versions for gem “jekyll-feed”:  
In Gemfile:  
jekyll-feed (~\> 0.12)

```
github-pages (= 202) was resolved to 202, which depends on
  jekyll-feed (= 0.11.0)"

```

Above error message seems to describe that github-pages (= 202) depends on jekyll-feed (= 0.11.0). please try to adjust the version of jekyll-feed. Hope it is helpful.

For more information, see “[Dependency versions](https://pages.github.com/versions/)” on the GitHub Pages site.
