One of the most important things you can do to keep your computer/phone/smart thermostat/etc secure is to keep it patched with the latest software. Most of the time, this means that old security flaws are repaired, new features are added, and – occasionally – new bugs are introduced. In my case, the latest macOS update, High Sierra (macOS 10.13), broke my blogging platform, Octopress 2.0! When I tried to write and test my last post and I received a rather ignominious error:
Bad Interpreter??? Needless to say, I was pretty terrified.
On the one hand, I love Octopress as a blogging platform. On the other hand, it can be infuriating to work with. Most blogging platforms (like Wordpress or Squarespace) have their entire framework hosted online, where you can upload your relatively unformatted content to have them parse them onto your blog. The upsides to this are that it’s very convenient and easy to use, but the downsides are that you have to have substantially more vulnerable software on your public-facing server (SQL, PHP, various plugins, not to mention the framework itself) and/or accept that your content and formatting are vulnerable to the whims and very existence of another company. The very different Octopress platform is a Jekyll fork that leaves a Ruby-based platform on your local machine to parse and build the entire dynamic-looking blog into a series of static pages. The challenge can come when you realize that your platform is a kludge of kludges and vulnerable to Apple’s surprise under-the-hood updates.
Few realize that Apple includes both Python and Ruby scripting environments. Up until recently, Apple used Ruby 2.0, however with the release of High Sierra, they updated to Ruby 2.3, subsequently breaking all of my gems.
The Fix (?)
Disclaimer: My success came from drinking wine and googling. Pure trial and error. Some of the below steps might be unnecessary, but the bottom line is: they worked.
First, I tried just updating my RubyGems using the following command:
While a lot of updates happened, it failed to work. More googling. Another proposed solution to a similar problem was updating the RubyGem manager, Bundler using the following command:
It was also encouraged to update macOS’s XCode Command Line Tools. An easy way to force that (rather than installing all of XCode) was by typing this:
It immediately prompted an update to the Command Line Tools. Annoyingly, the update panel demanded to be on top of everything, regardless of my virtual desktop (I’m a fan of running several apps full screen), but fortunately, it finished its business in about five minutes. I was feeling encouraged by the Bundler update, and decided to make 100% sure that my RubyGems were all up-to-date by re-running:
… and viola! Just like that, Octopress was back up and functional! As my disclaimer said, I’m not completely sure which of these steps truly fixed the problem and which ones might have been superfluous. I couldn’t find any other posts that were specific to my problem, so hopefully, this will help the other three people out there who will be in my similar circumstance.