Mistress of My Domain

Upgrading Jekyll and Ruby

I was trying to do a simple math thing with Ruby when it occured to me that maybe it wasn't working because I wasn't using an up to date Ruby. Since I was intending to upgrade Jekyll from 3.x to 4.x, I thought "let's just do it all!!!"

I searched to see if there was a maximum Ruby version for Jekyll before blowing everything up, but only found "Ruby version 2.5.0 or higher". It wasn't until much later (Sorry, I can't find the page anymore) that I found a page where someone was asking about Ruby versions and someone fairly official mentioning that Ruby 2.7 (?) being the version that the Jekyll developers themselves use. This is not that page.

Still, this series of articles made it seem pretty easy. Don't listen to Michael until part 4, though... at least if you're using MacOS. If you're on a Mac, do this instead. Prior to finding that article, I had done a lot of gem/bundle/brew updating without actually affecting the Ruby that was being used. rbenv was also involved, so you can see that I was throwing all the spaghetti at the wall.

Of course, that's not the end of the story. You also need to track through your Jekyll files to see where versions are being specified. Check your Gemfile and delete your Gemfile.lock. Because I was also developing a theme as a gem, I had a name-of-my-theme.gemspec which had versions specified in there as well. After I whack-a-mole'd all of those (and regenerated the theme gem), I did a bundle install and bundle update to get all the things, like Bundler itself, into versions that wanted to work together and then Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/style.scss':

I then read a bunch of stuff about people having issues with Sass and Jekyll front matter processing or Liquid issues, but my problem Error: "var(--nav-width)" is not a number for `max' on line 93:15 of _sass/my-theme.scss, in function `max` made me think maybe it's not a Jekyll-Sass problem, but a Sass-modern CSS problem. Yahtzee!

Post a New Comment






?

Note: for security reasons, a mailto link is being used. If configured on your end, this is the safest way for both parties. This activates your mailer to send the data entered. See here or here for why that might not work and what to do about it.