I use Jekyll for this blog, and this means dealing with Ruby in order to build this site on my local machine (a 2012 Macbook Pro running MacOS 10.13.3, High Sierra).
Sometimes, like today, this can be troublesome.
When I tried to run my
bundle exec jekyll serve command, I ran into this error:
After Googling this error, I found this (somewhat unrelated) issue on GitHub.
From the discussion, I gathered that it’s probably caused by my updating the version of Ruby on my machine, and I just need to reinstall the
bundle gem. So, I did this but got the following error:
So, I needed to update the owner of that directory and all its subdirectories:
Next, I had to add the following to my
ffi is explained in this GitHub issue. As for the other two libraries, I had to add them through trial and error. To be honest, I’m not entirely sure if they were necessary, but they were one of the multitude of approaches I tried to get Jekyll working again.
I also needed to manually install
nokogiri by following the instructions on their documentation page. Specifically, I had to do the following:
bundle is installed in the
vendor directory, I had to add
vendor to my
.gitignore so I don’t check in all the packages.
Along the way, I also had to run some
chown -R commands to modify the owner of some directories here and there. If you are following along, it will be clear from the error messages when to do this.
I hope this helps someone else out there. All told, this took me over an hour to figure out.