Jekyll After Ubuntu Upgrade

I recently had some issues running my Jekyll site after upgrading my OS (Pop!_OS, an Ubuntu derivative).

Ruby

Jekyll is a static web-site development environment - very useful for blogs but also general purpose landing pages.  I use it for profitview.net for example.  It is written in Ruby, a dynamically typed general purpose language, made popular in particular through Ruby-On-Rails website development system that became popular in the mid 2000s.

When updating Pop!_OS typically a new Ruby version will be installed - and the old one removed to avoid conflicts.  Ruby's bundler refers to a specific Ruby instance - which may no longer be there.  Therefore this must be updated.  The mechanism for doing this is as follows:
gem uninstall bundler
gem install bundler
This simply causes it to use the current native Ruby.  Unless the changes in Ruby are substantial, this should cause no problem.

Jekyll

With the newly installed bundler, Jekyll must be reinstalled:
gem install jekyll

Get Your Site Running

Due to the changes, you need to make sure your site is reconfigured properly.  Change to the top directory of your Jekyll site (where the index.html and _config.yml are) and:
bundle install
which will install the packages in Gemfile.lock.

Typically, at this point you will be able to build or run your site - try:
bundle exec jekyll serve --trace
Check the output for errors and check your site at http://127.0.0.1:4000/ - it should run normally.

Troubleshooting

With some upgrades there will be issues.  This could be because there are Ruby changes that are not backward compatible.  In this case it is likely that Jekyll will have also been updated - check jekyllrb.com.  Also, possibly some packages you have chosen to use will not have been updated and may be deprecated.  You should be able to see which packages have failed in the trace, then go to their (typically GitHub) pages to see if there is a remedy.

Comments

Popular posts from this blog

TEX on Linux

Freeze Changing HTML Element in Chrome Developer Tools

Change Unix terminal Title