How Does One Downgrade Jekyll to Work with Github Pages

What is the format for the dependency version to install github pages and jekyll?

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

To look up a gem's versions, use RubyGems.org.

Here are the versions for 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 if you want to be notified when new ones are released), just replace the "202" with the new version in quotes.

Hope this helps.

How can I install an older version of Jekyll?

You can specify the exact version in your Gemfile like this:

gem 'jekyll', '1.5.1'

Or install a specific version from the command line:

gem install jekyll -v 1.5.1

Installing Jekyll 3.8.5 on GitHub Pages

Okey, I think I figured it out. I have two different versions for Jekyll.

$ gem list jekyll

*** LOCAL GEMS ***

jekyll (4.0.1, 3.8.5)

What I did was to add underscores(_) as prefix and postfix to the version, thus, executed

bundle exec jekyll _3.8.5_ new docs

That fixed the problem because I believe this is the convention that gem follows when you have different versions.

Now, I have a different problem which is having 404 page but that's another issue to deal with.

How do I force jekyll to use a specific version when multiple versions are installed?

Your which jekyll command suggests you are not using the versions installed through rbenv (likely the system install instead), for me it's this:

$ which jekyll
~/.rbenv/shims/jekyll

I'd double check your rbenv install instructions (looks installed but not integrated), you might be missing the rbenv init command (https://github.com/rbenv/rbenv#how-rbenv-hooks-into-your-shell)


Once you've got that sorted, the convention has underscores either side of the version:

$ jekyll _3.8.5_ -v
jekyll 3.8.5

$ jekyll _2.4.0_ -v
jekyll 2.4.0

Since you are using rbenv, make sure you run rbenv rehash after installing a gem so it'll be accessible.



Related Topics



Leave a reply



Submit