How to Install an Older Version of Jekyll

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

How to start over with a clean gems install for jekyll?

It is highly recommend to not use system ruby but use a ruby version manager. One reason is that you won't have to use sudo before your gem commands.

If you want to remove all your current gems you should be able to just do

gem uninstall --all

But you might need to prepend it with sudo gem uninstall --all

If you intend to do any longer term work / multiple projects with ruby, I recommend using RVM. You can find detailed install instructions here

Some prefer rbenv however it's install instructions seem to be focused on MacOS, so if you're on linux, I dunno.

bundle install using old rubygems version

I don't know exactly what the issue was, but when I removed Gemfile.lock and reran bundle install everything worked fine. There were probably just some bad constraints or something in Gemfile.lock.

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.



Related Topics



Leave a reply



Submit