Garfield Nate

Big Fat Hairy Programmer

Hacking Through an Octopress Update

| Comments

A while back I watched a neat presentation from Justin Searls called The Social Coding Contract. He has lots of good things to say, but there was one comment that really hit home: my Jekyll blog was easy to setup 6 months ago, but now it’s impossible to maintain. Heh. Most of my trouble could have been avoided with more careful management of dependencies, but alas I am not a Ruby person and I did not realize that bundle update would completely sink my publishing abilities for 4 months. When I update Perl modules, cpan runs their tests on my machine and refuses to install unless they pass. bundle just installs them!

I think I ran into every possible problem, which was actually a good learning experience. Like uncle said, that’s what I get for using Windows! Some of the problems were my being a noob, and others were problems with various ruby modules. Honestly I don’t think that anyone with this many problems should even be using the platform, but gosh darnit I wanted it to work. And while I was at it, I updated to Octopress 3.0, which I believe will be much more manageable (I can freeze the gem version, instead of having to track Git commits). Here’s to the next person struggling with Octopress or Jekyll on Windows:


  • jekyll serve exits silently
    • See
    • Solve by specifying gem 'listen', '2.7.8' in your Gemfile. I tried 2.7.6 first, but ran into other problems.
    • Don’t forget to delete Gemfile.lock when changing your gem versions
  • Build Warning: Layout 'nil' requested in atom.xml does not exist
    • The layout specified in the YAML front matter in the given file apparently says nil, meaning don’t use any template in the _layouts folder.
    • The correct way to specify it is null
  • When trying to install Pygments you get LookupError: unknown encoding: cp65001
    • Python doesn’t normally accept cp65001 as utf-8, but they’re close enough, probably
    • Do set PYTHONIOENCODING=utf-8 before running python -m pip install pygments; if that doesn’t work (it broke for me on a Japanese computer), set the code page to ascii via chcp 437 instead.
  • Error: undefined method '[]' for nil:NilClass in pygments_code.rb
  • celluloid/calls.rb:48:in 'check': wrong number of arguments (2 for 1) (ArgumentError)
  • When you run octopress deploy, you get error : src refspec master doesn't match any
    • In my case, I had deployed once with the wrong branch name was trying to redeploy to the correct branch. The result of a deploy is cached and currently the branch is not changed properly.
    • Fix the problem by deleting .deploy and redeploying
    • See
  • octopress deploy does not first run a build; you must do jekyll build first.
  • octopress new draft Title, etc. gives cannot load such file: octopress/draft.
    • I don’t know why this is happening yet
    • For now the fix is to run bundle exec octopress new draft Title
    • See
    • “Such file” is a very Japanese expression, by the way: そのようなファイル
  • linklog entries don’t work properly (I don’t think they ever have).
  • Regenerating appears to take forever, so I just have to restart every time. That’s annoying. Unfortunately I don’t currently have any solution to that. It’s also not a show-stopper.

After smoothing out all of the real errors, the (currently) permanent workarounds I need are 1) to set MENTOS_TIMEOUT to a large number and 2) to run commands with bundle exec.

Hope this helps!