# Why can't I install the github-pages plug-in when I set up Jekyll?

**URL:** <https://talk.jekyllrb.com/t/why-cant-i-install-the-github-pages-plug-in-when-i-set-up-jekyll/3743>\
**Category:** Help\
**Created:** [December 29, 2019, 3:42pm UTC](https://talk.jekyllrb.com/t/why-cant-i-install-the-github-pages-plug-in-when-i-set-up-jekyll/3743 "2019-12-29T15:42:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bakuiseok](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@bakuiseok](https://talk.jekyllrb.com/u/bakuiseok)\
**Post date:** [December 29, 2019, 3:42pm UTC](https://talk.jekyllrb.com/t/why-cant-i-install-the-github-pages-plug-in-when-i-set-up-jekyll/3743/1 "2019-12-29T15:42:04Z")

</div>

**Problem**  
The following issues occur while following the [Step.8 of guide](https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll#creating-your-site) in the following section:

 ![스크린샷, 2019-12-29 23-40-42](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/2X/6/61ab18685235eae8d4d7eaf3f0a15bbef2c0e734.png)

**System Specifications**

- Ubuntu 19.10 x64
- Ruby: ruby 2.5.5p157 (2019-03-15 revision 67260) [x86\_64-linux-gnu]
- Gem: 2.7.6.2
- Bundler: 2.1.
- Jekyll: 4.0.0

Reference

> **[bakuiseok/bakuiseok.github.io](https://github.com/bakuiseok/bakuiseok.github.io)**
>
> Contribute to bakuiseok/bakuiseok.github.io development by creating an account on GitHub.

---

<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:** [December 29, 2019, 5:55pm UTC](https://talk.jekyllrb.com/t/why-cant-i-install-the-github-pages-plug-in-when-i-set-up-jekyll/3743/2 "2019-12-29T17:55:50Z")

</div>

try `bundle install` and see if that works.

---

<div class="post-metadata">

**Author:** ![bakuiseok](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@bakuiseok](https://talk.jekyllrb.com/u/bakuiseok)\
**Post date:** [December 30, 2019, 6:11pm UTC](https://talk.jekyllrb.com/t/why-cant-i-install-the-github-pages-plug-in-when-i-set-up-jekyll/3743/3 "2019-12-30T18:11:19Z")

</div>

Thank you for your answer.

I tried that already. 😭

---

<div class="post-metadata">

**Author:** ![monfresh](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/monfresh/32/2988_2.png) [@monfresh](https://talk.jekyllrb.com/u/monfresh)\
**Post date:** [December 12, 2020, 2:15pm UTC](https://talk.jekyllrb.com/t/why-cant-i-install-the-github-pages-plug-in-when-i-set-up-jekyll/3743/4 "2020-12-12T14:15:26Z")

</div>

Hi @bakuiseok. I’m sorry you weren’t able to install git-hub pages. That must have been frustrating. Looking at the GitHub documentation you were trying to follow, I can see why you were having trouble. The documentation could be clearer in some places.

From looking at your GitHub repo, I can see that your [Gemfile](https://github.com/bakuiseok/bakuiseok.github.io/blob/master/Gemfile) contains the contents mentioned in Step 8 of the GitHub guide. The next step is to follow the instructions in those 3 lines:

```auto
# 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

```

In Ruby, a line that starts with a `#` sign is known as a comment, meaning it’s disabled. Ruby will not try to run it. When the instructions say to “uncomment the line below”, they mean you need to remove the `#` sign so that it looks like this:

```auto
# 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

```

The way Bundler works is that when you run `bundle install` or `bundle update`, it looks for gems to install or update based on what it is in the `Gemfile`. Since the `github-pages` gem in your Gemfile was commented out (meaning it had a `#` before it), Bundler could not find it, which explains why it did not get installed when you ran `bundle install`, and why it could not find it when you ran `bundle update github-pages`.

The next step is to remove the `jekyll` gem from the Gemfile, as mentioned in the first line of the Step 8 instructions:

```auto
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and

```

This means you can either completely remove the line that starts with `gem "jekyl"`, or you can add a `#` at the beginning to comment it out, in case you change your mind later. Here is what your Gemfile should look like:

```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"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
 gem "hyde"
# 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

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
  gem "jekyll-gist"
  gem "jekyll-paginate"
  gem "jekyll-seo-tag"
  gem 'jekyll-admin'
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?

```

Once you update your Gemfile and save it, the next step is to run `bundle install`. This will automatically install the latest version of `github-pages`. You only need to run `bundle update` if you want to upgrade a gem to a newer version.

Try that and let me know if it worked.

---

<div class="post-metadata">

**Author:** ![monfresh](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/monfresh/32/2988_2.png) [@monfresh](https://talk.jekyllrb.com/u/monfresh)\
**Post date:** [December 18, 2020, 4:21pm UTC](https://talk.jekyllrb.com/t/why-cant-i-install-the-github-pages-plug-in-when-i-set-up-jekyll/3743/5 "2020-12-18T16:21:37Z")

</div>

A slight correction to my previous post. The final step should be to run `bundle update`, not `bundle install` due to `github-pages` requiring an older version of Jekyll.

I submitted a pull request to GitHub docs to make the instructions clearer, so hopefully that should be merged soon. [https://github.com/github/docs/pull/2178](https://github.com/github/docs/pull/2178)

---

<div class="post-metadata">

**Author:** ![kbala97](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/kbala97/32/4769_2.png) [@kbala97](https://talk.jekyllrb.com/u/kbala97)\
**Post date:** [July 28, 2022, 4:05pm UTC](https://talk.jekyllrb.com/t/why-cant-i-install-the-github-pages-plug-in-when-i-set-up-jekyll/3743/6 "2022-07-28T16:05:15Z")

</div>

I’m using WSL2 (just FYI) and setting up my local dev environment.  
Ran: “bundle exec jekyll serve --drafts --livereload --force polling”  
Error message: “Could not find gem ‘github-pages’ in locally installed gems. Run `bundle install` to install missing gems.”  
Ran: “bundle install”  
Error messages: “Bundler::GemNotFound: Could not find sass-3.7.4.gem for installation” and “An error occurred while installing sass (3.7.4), and Bundler cannot continue.”  
Stalled at this point.

## My Gemfile is below:

source “[https://rubygems.org](https://rubygems.org)”

# To update to the latest github dependencies run: `bundle update`

# To list current versions: `bundle exec github-pages versions`

# Check github versions: [Dependency versions | GitHub Pages](https://pages.github.com/versions/)

gem “github-pages”, group: :jekyll\_plugins

group :jekyll\_plugins do  
gem ‘jekyll-feed’  
gem ‘jekyll-paginate’  
gem ‘jekyll-seo-tag’  
gem ‘jekyll-sitemap’  
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?
